vhdl - VHDL代码和测试台有什么错误吗?
问题描述
我一直在 Quartus 2 中尝试时钟触发器,但收到以下错误
错误 (10533):T17_ClockedProcessTb.vhd(42) 处的 VHDL 等待语句错误:等待语句必须包含带有 UNTIL 关键字的条件子句
我为触发器创建了以下代码
library ieee;
use ieee.std_logic_1164.all;
entity T17_FlipFlop is
port (
clk: in std_logic;
nRst: in std_logic;
Input: in std_logic;
Output: out std_logic);
end entity;
architecture rtl of T17_FlipFlop is
begin
process(Clk) is
begin
if rising_edge(Clk) then
if nRst= '0' then
Output<= '0';
else
Output<= Input;
end if;
end if;
end process;
end architecture;
我也为此创建了一个测试平台
library ieee;
use ieee.std_logic_1164.all;
entity T17_ClockedProcessTb is
end entity;
architecture sim of T17_ClockedProcessTb is
constant ClockFrequency : integer := 100e6; --100 MHz
constant ClockPeriod : time := 1000 ms;
signal ClK : std_logic := '1';
signal nRst: std_logic := '0';
signal Input: std_logic:= '0';
signal Output: std_logic;
begin
--The Device Under Test (DUT)
i_FlipFlop : entity work.T17_FlipFlop(rtl)
port map(
ClK => Clk,
nRst => nRst,
Input => Input,
Output => Output);
--Process for generating clock
Clk <= not Clk after ClockPeriod /2 ;
--Testbench sequence
process is
begin
--The the DUT out of reset
nRst<= '1';
--wait for 20 ns;
Input<= '1' after 20 ns;
--wait for 22 ns;
Input<= '0' after 22 ns;
--wait for 6 ns;
Input<= '1' after 6 ns;
--wait for 20 ns;
--Reset the DUT
nRst<= '0' after 20 ns;
wait;
end process;
end architecture;
我编译了第一个代码,然后编译了第二个代码,但我在做同样的事情时出错了?
我能做些什么来删除它们?
解决方案
推荐阅读
- excel - 通过VBA为所有工作表中的指定单元格设置一个值
- java - 为什么jdbc调用存储过程“插入本地表,选择本地表”CallableStatement.execute返回false?
- flutter - 如何在构建方法之外访问 mediaquery.of(context).width.height?
- html - 没有引导程序就无法换行的图像和文本?
- java - 在非活动类中获取原始资源(声音)
- javascript - 使用 regEx 验证属性名称
- c# - 如何验证xml属性是否存在于c#中
- powerbi - Power BI - 除法返回 1
- python-3.x - Python 3:unescape 文字十六进制、unicode 和 python 转义
- python - 同时递归两个链表