如何解决在Modelsim上的VHDL中编译项目
在Modelsim上的VHDL中编译项目我遇到以下错误:**错误:C:/Users/User.User-PC/Desktop/progettoasi.vhd(15):在“体系结构”附近:语法错误**错误:C:/Users/User.User-PC/Desktop/progettoasi.vhd(24):在“ reg_process”附近:(vcom-1576)期望结束。
这是我的代码:
enter code here
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
entity asic is
port ( ck,reset:in std_logic;
req_in: in std_logic_vector(1 downto 0);
req_out: out std_logic_vector(1 downto 0);
req_in_word,response_in_data,nanoinstruction: in std_logic_vector(49 downto 0);
req_out_word,response_out_data: out std_logic_vector(49 downto 0);
response_in,response_out_ack,req_out_ack: in std_logic;
response_out,response_in_ack,req_in_ack: out std_logic);
end asic;
architecture asic_rtl of asic is
signal state,next_state: integer;
signal tmp_source1,tmp_source2 : std_logic_vector(15 downto 0);
signal value1,value2 : std_logic_vector(31 downto 0);
type regsarray IS array (0 to 2**12-1) OF std_logic_vector(49 downto 0);
signal reg_file : regsarray;
signal tmp_nanoinstruction: std_logic_vector(49 downto 0);
signal rw: std_logic;
begin
reg_process:process(ck,reset)
begin
if reset='1' then
state<=1;
elsif rising_edge(ck) then
state<= next_state;
end if;
end process reg_process;
强调文字
我不明白我在做什么错。
谢谢。
解决方法
我同意马修·泰勒(Matthew Taylor)的观点:体系结构需要封闭。 尝试在文件末尾添加以下内容:
end asic_rtl;
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。