集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 2269|回复: 2

verilog3人表决器

[复制链接]
encounter 发表于 2010-6-28 01:00:37 | 显示全部楼层 |阅读模式
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
--*********************************************
ENTITY majority_voter IS
PORT(SW : IN std_logic_vector(3 DOWNTO 1);
L : OUT std_logic_vector(2 DOWNTO 1));
--L2 is a yellow LED AND L1 is a RED LED
END majority_voter;
--*********************************************
ARCHITECTURE concurrent OF majority_voter IS

BEGIN
  WITH SW SELECT
  L <= "10" WHEN "011",
     "10"WHEN "101",
     "10"WHEN "110",
     "10"WHEN "111",
     "01" WHEN OTHERS;
END concurrent;
inter 发表于 2010-6-28 01:24:25 | 显示全部楼层
what's going on?
CHANG 发表于 2010-6-28 02:11:05 | 显示全部楼层
什么意思 我英语不好~
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2024-12-24 10:25 , Processed in 0.062977 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表