等待语句必须包含带 UNTIL 关键字的条件子句
wait statement must contain condition clause with UNTIL keyword
下面的VHDL是用来做test bench的。在分析过程中,我在第一个 wait 语句中不断收到错误消息:"wait statement must contain condition clause with UNTIL keyword" 我有几个以这种方式编写的工作测试平台。我似乎找不到错误可能是什么。
`library IEEE;
USE IEEE.std_logic_1164.all;
entity case_ex_TB is end;
architecture simple_test of case_ex_TB is
--- DUT Component Declaration ---
component case_ex
port(
clk, rstN: IN std_logic;
color: OUT std_logic_vector(2 downto 0));
end component;
--- Signals Declaration ---
signal rst, clock: std_logic:='0';
signal color: std_logic_vector(2 downto 0);
begin
DUT: case_ex --- DUT instantiation ---
port map (clk => clock,
rstN => rst,
color => color);
--- Signal's Waves Creation ---
rst <= '1','0' after 50 ns, '1' after 2 us;
clock_crtate: process
begin
while rst = '0' loop
clock <= '1','0' after 50 ns;
wait for 100 ns;
end loop;
clock <= '1';
wait;
end process;
end simple_test;`
您收到此错误是因为您已将测试平台设置为 Quartus-II 中的顶级实体。顶级实体必须保留组件 case_ex
,并且该组件必须包含可综合代码。
要模拟您的测试台,您必须配置一个测试台。只需单击 "RTL Simulation" 之前的加号,然后单击 "Edit Settings"。 (名称可能因 Quartus 版本而异)。
您可能注意到的另一件事是,有必要将此文件作为模拟文件放入路径中:
Assignments -> settings -> EDA tool settings -> simulation
自然地,改变添加一个测试平台。
另外需要注意的是,如果要更改顶层实体,只需要在Quartus中按照:
Project -> Set as top level entity (in the file you are in)
此外,在项目导航器中,确保不要错过这样一个事实:您需要每个文件才能让您的程序运行。
下面的VHDL是用来做test bench的。在分析过程中,我在第一个 wait 语句中不断收到错误消息:"wait statement must contain condition clause with UNTIL keyword" 我有几个以这种方式编写的工作测试平台。我似乎找不到错误可能是什么。
`library IEEE;
USE IEEE.std_logic_1164.all;
entity case_ex_TB is end;
architecture simple_test of case_ex_TB is
--- DUT Component Declaration ---
component case_ex
port(
clk, rstN: IN std_logic;
color: OUT std_logic_vector(2 downto 0));
end component;
--- Signals Declaration ---
signal rst, clock: std_logic:='0';
signal color: std_logic_vector(2 downto 0);
begin
DUT: case_ex --- DUT instantiation ---
port map (clk => clock,
rstN => rst,
color => color);
--- Signal's Waves Creation ---
rst <= '1','0' after 50 ns, '1' after 2 us;
clock_crtate: process
begin
while rst = '0' loop
clock <= '1','0' after 50 ns;
wait for 100 ns;
end loop;
clock <= '1';
wait;
end process;
end simple_test;`
您收到此错误是因为您已将测试平台设置为 Quartus-II 中的顶级实体。顶级实体必须保留组件 case_ex
,并且该组件必须包含可综合代码。
要模拟您的测试台,您必须配置一个测试台。只需单击 "RTL Simulation" 之前的加号,然后单击 "Edit Settings"。 (名称可能因 Quartus 版本而异)。
您可能注意到的另一件事是,有必要将此文件作为模拟文件放入路径中:
Assignments -> settings -> EDA tool settings -> simulation
自然地,改变添加一个测试平台。
另外需要注意的是,如果要更改顶层实体,只需要在Quartus中按照:
Project -> Set as top level entity (in the file you are in)
此外,在项目导航器中,确保不要错过这样一个事实:您需要每个文件才能让您的程序运行。