集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 1061|回复: 2

VHDL语言中的一个问题!

[复制链接]
飞扬云天 发表于 2013-4-17 17:08:30 | 显示全部楼层 |阅读模式
library ieee;
use ieee.std_logic_1164.all;
entity decoder is
        port(
                ena:in std_logic;
                sel:in integer range 0 to 7;
                xut std_logic_vector(4 downto 0));
end decoder;
architecture not_ok of decoder is
begin
        process(ena,sel)
        begin
                if(ena='0')then
                        x<=(others=>'1');
                else
                        x<=(sel=>'0',others=>'1');
                end if;
        end process;
end not_ok;
在巴西人写的书籍里有这么一个实列,m-n译码器,但在代码中x<=(sel=>'0',others=>'1')中存在缺陷,原因是sel不是局部静态信号
但该怎么修正呢?自己是菜鸟级的,望各位大侠指教……
 楼主| 飞扬云天 发表于 2013-4-17 18:22:13 | 显示全部楼层
没有人可以解答吗?
 楼主| 飞扬云天 发表于 2013-4-18 16:58:43 | 显示全部楼层
这里难道没有高手吗?
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

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

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

GMT+8, 2025-6-27 13:27 , Processed in 0.067269 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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