【问题标题】:Compile a project in VHDL on Modelsim在 Modelsim 上用 VHDL 编译项目
【发布时间】:2020-10-15 01:13:35
【问题描述】:

在 Modelsim 上用 VHDL 编译项目我遇到了以下错误:** 错误:C:/Users/User.User-PC/Desktop/progettoasi.vhd(15): near "architecture": syntax error ** 错误: C:/Users/User.User-PC/Desktop/progettoasi.vhd(24): "reg_process" 附近: (vcom-1576) 期待 END。

这是我的代码:

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;  

强调文字

我不明白我做错了什么。

提前谢谢你。

【问题讨论】:

  • 此代码在第 34 行有语法错误 - 您缺少最后的 end;。它在第 15 行或第 24 行没有语法错误。

标签: vhdl modelsim


【解决方案1】:

我同意 Matthew Taylor 的观点:架构需要关闭。 尝试将以下内容添加到文件末尾:

end asic_rtl;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-10
    • 2016-06-24
    • 1970-01-01
    相关资源
    最近更新 更多