Vhdl 加载设计模型SIM PE学生版10.4时出错
我正在创建一个名为alpha的新项目,然后创建一个新文件test.vhdVhdl 加载设计模型SIM PE学生版10.4时出错,vhdl,modelsim,Vhdl,Modelsim,我正在创建一个名为alpha的新项目,然后创建一个新文件test.vhd library ieee; use ieee.std_logic_1164.all; entity d_latch is port( data_in:in std_logic; data_out:out std_logic; enable:in std_logic); end d_latch; architecture beh of d_latch is begin process(data_in,enable)
library ieee;
use ieee.std_logic_1164.all;
entity d_latch is
port(
data_in:in std_logic;
data_out:out std_logic;
enable:in std_logic);
end d_latch;
architecture beh of d_latch is
begin
process(data_in,enable)
begin
if(enable <= '1') then
data_out <= data_in;
end if;
end process;
end beh;
首先编辑if语句以获得正确的结果:
ifenable我在Modelsim上也遇到过类似的问题,即使只是对VHDL代码做了一些小修改并重新编译。一件似乎有效的事情是根据设计将端口模式从缓冲区更改为out或inout。您最好创建一个测试台,以便在其中添加d_闩锁组件的空实体。编译该测试台,然后运行它。您在回答的第二个实例中拼错了“enable”。
Error loading design