Vhdl 请更正我的代码这是nand门测试台,我有一些错误吗?请帮帮我
错误:HDLCompiler:69-D:/xilinx程序/and2/kj.vhd行82:未声明 错误:HDLCompiler:580-D:/xilinx程序/and2/kj.vhd第85行:标签不匹配;预期行为 错误:HDLCompiler:854-D:/xilinx程序/and2/kj.vhd第38行:由于以前的错误,单元被忽略Vhdl 请更正我的代码这是nand门测试台,我有一些错误吗?请帮帮我,vhdl,Vhdl,错误:HDLCompiler:69-D:/xilinx程序/and2/kj.vhd行82:未声明 错误:HDLCompiler:580-D:/xilinx程序/and2/kj.vhd第85行:标签不匹配;预期行为 错误:HDLCompiler:854-D:/xilinx程序/and2/kj.vhd第38行:由于以前的错误,单元被忽略 library ieee; use ieee.std_logic_1164.all; entity kj is end kj; architecture beh
library ieee;
use ieee.std_logic_1164.all;
entity kj is
end kj;
architecture behavior of kj is
-- Component Declaration for the Unit Under Test (UUT)
component and2
port(
a : in std_logic;
b : in std_logic;
c : out std_logic
);
end component;
--Inputs
signal a : std_logic := '0';
signal b : std_logic := '0';
--signal clk : std_logic :='0';
--Outputs
signal c : std_logic;
-- No clocks detected in port list. Replace <clock> below with
-- appropriate port name
begin
-- Instantiate the Unit Under Test (UUT)
uut : and2 port map (
a => a,
b => b,
c => c
);
-- Clock process definitions
-- Stimulus process
a <= '0', '1' after 50 ns, '0' after 80 ns;
b <= '0', '1' after 30 ns, '0' after 120 ns;
process
begin
wait for 60 ns;
assert(c = '1')
report "output of and gate is incorrect"
severity node;
end process;
end kj;
要进行编译,需要纠正两个问题: 第46行:节点;=>笔记 第48行:结束kj;=>终端行为;
我不太擅长VHDL,但看起来您在这里没有给我们提供足够的代码。你在这里工作的文件是什么?那么kj.vhd在哪里?它抱怨你没有定义一些东西。如果你能提供一些关于你到目前为止所做尝试的信息,以及为什么一些简单的语法错误会阻碍你的话,这会很有帮助。@BrantUnger:-这是我为一个简单的与非门编写的测试台。嘿,谢谢。。。你能推荐一些编写测试台和简单vhdl语言的资源吗?我是vhdl的新手,可以给你介绍许多有用的小例子,你也可以在下面看看。特别是我会建议你得到一份,因为它如果作为VHDL参考非常好。最重要的是:使用模拟器进行大量VHDL实验,这样您就可以熟悉该语言,并且可以自己修复简单的错误;否则你永远也不会成功。