设为首页
加入收藏
联系站长
首页 | 文章中心 | 下载中心 | 本站商品 | 学习资料 | 
您现在的位置: 电子爱好者 >> 文章中心 >> 数字电路 >> 正文 用户登录 新用户注册
[VHDL实例]最高优先级编码器          【字体:
[VHDL实例]最高优先级编码器
作者:佚名    文章来源:本站原创    点击数:    更新时间:2006-2-17

 -- Highest Priority Encoder
 -
 LIBRARY ieee;
 USE ieee.std_logic_1164.ALL;
 entity priority is
    port(I : in bit_vector(7 downto 0); --inputs to be prioritised
       A : out bit_vector(2 downto 0); --encoded output
       GS : out bit);  --group signal output
 end priority;
 
 architecture v1 of priority is
 begin
    process(I)
    begin
       GS <= '1'; --set default outputs
       A <= "000";
       if I(7) = '1' then
     A <= "111";
       elsif I(6) = '1' then
     A <= "110";
       elsif I(5) = '1' then
     A <= "101";
       elsif I(4) = '1' then
     A <= "100";
       elsif I(3) = '1' then
     A <= "011";
       elsif I(2) = '1' then
     A <= "010";
       elsif I(1) = '1' then
     A <= "001";
       elsif I(0) = '1' then
     A <= "000";
       else
     GS <= '0';
       end if;
    end process;   
 end v1;

文章录入:admin    责任编辑:admin 
  • 上一篇文章: VHDL 程序举例

  • 下一篇文章: [VHDL实例]三人表决器(三种不同的描述方式)
  • 发表评论】【告诉好友】【打印此文】【关闭窗口
       最新热点    最新推荐    相关文章
  • [VHDL实例]地址译码(for m68…

  • [VHDL实例]加法器描述

  • [VHDL实例]8位相等比较器

  • [VHDL实例]解复用器

  • [VHDL实例]三态总线(注2)

  • |VHDL实例|双向总线(注2)

  • [VHDL实例]多路选择器(使用c…

  • [VHDL实例]多路选择器(使用w…

  • [VHDL实例]多路选择器(使用i…

  • [VHDL实例]多路选择器(使用…

  • 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)  
    {$PopAnnouceWindow(400,440)}