VHDL 编译错误 Testbench (ModelSim)
VHDL compliling error Testbench (ModelSim)
我目前正在 ModelSim 中做一个项目,我在编译时遇到了一些问题。我只想将 pin 的值从 0 更改为 1,但是当我编译时它说有 os 错误。
tool directives are not supported before VHDL 2008
。我不知道为什么会这样,一旦我的教授取消了一个示例文件,我就完全按照他的方式做了。完整代码如下。
-- João Vítor Abrantes - 19/0031085
-- UnB - Engenharia Elétrica
--
-- - Experimento 2 -
-- Somador Completo
-- Entity
entity testbench is end;
-- Library
library ieee;
use ieee.std_logic_1164.all;
use std.textio.all;
architecture tb_sum of testbench is
-- Component
component tb_sum1
port(
W : in std_logic; --A
X : in std_logic; --B
Y : in std_logic; --Cin
Z : out std_logic; --S
Z1 : out std_logic --Cout
);
end component;
signal i_1 : std_logic;
signal i_2 : std_logic;
signal i_3 : std_logic;
Begin
S1 : tb_sum1 port map ( W => i_1 , Y => i_2 , X => i_3 , Z => open);
Cout1 : tb_sum1 port map ( W => i_1 , Y => i_2 , X => i_3 , Z1 => open);
estimulo: process
begin
wait for 5 ns; i_1 <= `1`, -- This is the part that he says the error is
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait;
end process estimulo;
end tb_sum;
我搜索了 tool directives VHDL
,我得到了这个:
Tool directives are arbitrary words preceded by a backtick character `.
我认为这里应该使用'
或"
。
你应该使用 ' 而不是 ` 并且还需要使用 ;而不是,
您的代码:
wait for 5 ns; i_1 <= `1`,
替换为:
wait for 5 ns; i_1 <= '1';
我目前正在 ModelSim 中做一个项目,我在编译时遇到了一些问题。我只想将 pin 的值从 0 更改为 1,但是当我编译时它说有 os 错误。
tool directives are not supported before VHDL 2008
。我不知道为什么会这样,一旦我的教授取消了一个示例文件,我就完全按照他的方式做了。完整代码如下。
-- João Vítor Abrantes - 19/0031085
-- UnB - Engenharia Elétrica
--
-- - Experimento 2 -
-- Somador Completo
-- Entity
entity testbench is end;
-- Library
library ieee;
use ieee.std_logic_1164.all;
use std.textio.all;
architecture tb_sum of testbench is
-- Component
component tb_sum1
port(
W : in std_logic; --A
X : in std_logic; --B
Y : in std_logic; --Cin
Z : out std_logic; --S
Z1 : out std_logic --Cout
);
end component;
signal i_1 : std_logic;
signal i_2 : std_logic;
signal i_3 : std_logic;
Begin
S1 : tb_sum1 port map ( W => i_1 , Y => i_2 , X => i_3 , Z => open);
Cout1 : tb_sum1 port map ( W => i_1 , Y => i_2 , X => i_3 , Z1 => open);
estimulo: process
begin
wait for 5 ns; i_1 <= `1`, -- This is the part that he says the error is
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait for 5 ns;
wait;
end process estimulo;
end tb_sum;
我搜索了 tool directives VHDL
,我得到了这个:
Tool directives are arbitrary words preceded by a backtick character `.
我认为这里应该使用'
或"
。
你应该使用 ' 而不是 ` 并且还需要使用 ;而不是,
您的代码:
wait for 5 ns; i_1 <= `1`,
替换为:
wait for 5 ns; i_1 <= '1';