完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
按照一本书练习vhdl语言,仿真时遇到了问题,ise10.1版本,请教各位前辈,这是什么问题?
错误提示:ERROR:Simulator:29 - at 0 ns : Delay 50000000 fs is not greater than previous waveform element delay 500000000 fs in assignment for target signal load 仿真语句: ENtiTY MY_CNTR_TB IS END MY_CNTR_TB; ARCHITECTURE behavior OF MY_CNTR_TB IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT MY_CNTR PORT( CLK : IN std_logic; RST : IN std_logic; D_IN : IN std_logic_vector(7 downto 0); Q_OUT : OUT std_logic_vector(7 downto 0); LOAD : IN std_logic; CE : IN std_logic; UPDN : IN std_logic ); END COMPONENT; --Inputs signal CLK_SIG : std_logic := '0'; signal RST : std_logic := '1'; signal D_IN : std_logic_vector(7 downto 0) := X"0F"; signal LOAD : std_logic := '0'; signal CE : std_logic := '1'; signal UPDN : std_logic := '1'; --Outputs signal Q_OUT : std_logic_vector(7 downto 0); BEGIN -- Instantiate the Unit Under Test (UUT) uut: MY_CNTR PORT MAP ( CLK => CLK_SIG, RST => RST, D_IN => D_IN, Q_OUT => Q_OUT, LOAD => LOAD, CE => CE, UPDN => UPDN ); CLK_SIG <= not CLK_SIG after 5 ns; -- Stimulus process stim_proc: process begin CE <= '1','0' after 300 ns,'1' after 400 ns; RST <= '0' after 15 ns,'1' after 40 ns; UPDN <= '0' after 750 ns; LOAD <= '1' after 500 ns, '0' after 50 ns; wait; end process; END; |
|
相关推荐
2个回答
|
|
你要实现的是什么功能的??
|
|
|
|
很简单,就是一个可加可减的计数器。 entity MY_CNTR is generic (CNT_WIDTH: integer:= 8); port( CLK: in std_logic; RST: in std_logic; D_IN: in std_logic_vector(CNT_WIDTH-1 downto 0); Q_OUT: out std_logic_vector(CNT_WIDTH-1 downto 0); LOAD: in std_logic; CE: in std_logic; UPDN: in std_logic); end MY_CNTR; architecture Behavioral of MY_CNTR is signal INT_CNT: std_logic_vector(CNT_WIDTH-1 downto 0); begin process (CLK,RST) begin if RST='0' then INT_CNT <= (others=> '0'); elsif rising_edge(CLK) then if CE='1' then if LOAD='1' then INT_CNT <= D_IN; else if UPDN='1' then INT_CNT <= INT_CNT + 1; else INT_CNT <= INT_CNT - 1; end if; end if; end if; end if; end process; Q_OUT <= INT_CNT; end Behavioral; |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1533 浏览 1 评论
1313 浏览 0 评论
矩阵4x4个按键,如何把识别结果按编号01-16(十进制)显示在两个七段数码管上?
1523 浏览 0 评论
925 浏览 0 评论
2317 浏览 0 评论
1460 浏览 35 评论
5671 浏览 113 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 15:38 , Processed in 0.495067 second(s), Total 43, Slave 37 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号