compiler-errors - 在Modelsim VHDL中编译

标签 compiler-errors vhdl modelsim

我尝试运行VHDL代码,但此错误(vcom-11)不断出现。

vcom -work work -2002 -explicit -vopt -stats=none /nas/ei/home/ga94mel/Documents/VHDL_C/test_bench.vhd Model Technology ModelSim SE-64 vcom 10.4c Compiler 2015.07 Jul 19 2015

-- Loading package STANDARD

-- Loading package TEXTIO

-- Loading package std_logic_1164

-- Loading package NUMERIC_STD

-- Compiling entity MEM4096x12TEST

-- Compiling configuration MEM4096x12TESTCONF

** Error: (vcom-11) Could not find work.mem4096x12test(TB).

** Error: /nas/ei/home/ga94mel/Documents/VHDL_C/test_bench.vhd(10): (vcom-1537) Block specification "TB" is not an architecture name.

** Error: /nas/ei/home/ga94mel/Documents/VHDL_C/test_bench.vhd(11): VHDL Compiler exiting



这是脚本:
    LIBRARY IEEE;
    USE IEEE.std_logic_1164.all;
    use IEEE.numeric_std.all;
    ENTITY MEM4096x12TEST IS
    end  MEM4096x12TEST ;

    --Configuration for Component Instantiation 

    configuration MEM4096x12TESTCONF of MEM4096x12TEST is
    for TB
     for UUT: MEM4096x12 use 
        entity WORK.RAM4096x12(behavioral)
         port map(
          w_en => w_en_C,
          addr => addr_C,
          data_in => data_in_C,
          data_out => data_out_C);
      end for;
    end for;
    end MEM4096x12TESTCONF; 

    architecture TB  of MEM4096x12TEST IS 
    Component MEM4096x12  
    PORT(
    w_en_C : in bit;
    addr_C : in bit_vector(11 downto 0);
    data_in_C: in bit_vector(11 downto 0);
    data_out_C: out  bit_vector (11 downto 0)
    );
    end Component ;
    Signal w_en_s :bit :='0';
    Signal addr_s, data_in_s, data_out_s  :  bit_vector(11 downto 0);
    begin 
    UUT: MEM4096x12 
    Port Map (w_en_C => w_en_s, 
        addr_C => addr_s,
        data_in_C => data_in_s , 
        data_out_C => data_out_s );
    w_en_s <= '1' after 5ns , '0' after 10 ns ; 
    data_in_s <="111111111111"  after 4 ns ; 
    addr_s <="000000000001"  after 4 ns , 
             "000000000010"  after 12 ns , 
             "000000000001"  after 20 ns ; 
    end TB ;

--Configuration for Entity Instantiation

configuration MEM4096x12TESTCONF of MEM4096x12TEST is
for TB
end For ; 
end MEM4096x12TESTCONF ;

architecture TB of MEM4096x12TEST_short IS 
Signal w_en_s :bit ; 
Signal addr_s,data_in_s , data_out_s  :  bit_vector(11 downto 0); 
begin 
UUT : entity Work.MEM4096x12(behavioral) 
port map ( w_en => w_en_s,
    addr => addr_s,
    data_in => data_in_s , 
    data_out => data_out_s); 
w_en_s <= '1' after 5ns , '0' after 10 ns ; 
data_in_s <= "111111111111"  after 4 ns ; 
addr_s <= "000000000001"  after 4 ns , 
          "000000000010"  after 12 ns , 
          "000000000001"  after 20 ns ; 
end TB ;

最佳答案

配置MEM4096x12TESTCONF需要遵循该体系结构。

关于compiler-errors - 在Modelsim VHDL中编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55005001/

相关文章:

compiler-errors - 为什么使用 f32::consts::E 会给出错误 E0223 但 std::f32::consts::E 不会?

vhdl - clk'event 与rising_edge()

vhdl - 在 vhdl 中计算(和验证)以太网 FCS (crc32)

linux - ModelSim-Altera 错误

system-verilog - 通过 SystemVerilog DPI-C 层传递 C 结构

vhdl - 使用 VHDL 2008 通用类型功能创建伪动态类型

java - 为什么我会收到此错误?这是Java中kickstart 2020(分配)的第一个问题

c++ - GCC 4.7 从初始化器列表初始化 unique_ptrs 容器失败

c++ - 找不到CoreAudio,AudioToolbox,AudioUnit等 header

syntax - 如何在不循环的情况下将信号切片分配给单个标准逻辑?