Vhdl测试台未知语法错误

时间:2015-05-28 10:04:07

标签: testing syntax vhdl vivado

我正在尝试编写测试平台,但Vivado告诉我在特定行上有一个语法错误。我无法意识到我做错了什么。任何人都可以提供帮助。

这是我的代码:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.Numeric_Std.all;

entity mmu_tb is
end mmu_tb;

architecture test of mmu_tb is

  component mmu
    port (
      virt : in std_logic_vector(15 downto 0);
      phys : out std_logic_vector(15 downto 0);
      clock   : in  std_logic;
      we      : in  std_logic;
      datain  : in  std_logic_vector(7 downto 0)
    );
  end component;

  signal virt    std_logic_vector(15 downto 0);
  signal phys    std_logic_vector(15 downto 0);
  signal clock   std_logic;
  signal we      std_logic;
  signal datain  std_logic_vector(7 downto 0);

  constant clock_period: time := 10 ns;
  signal stop_the_clock: boolean;

begin

  mmu : mmu port map ( virt   => virt,
                     phys   => phys,
                     clock  => clock,
                     we     => we,
                     datain => datain);

 stimulus : process
     begin
     -- whatever
     end process;

     clocking: process
       begin
         while not stop_the_clock loop
           clock <= '1', '0' after clock_period / 2;
           wait for clock_period ;
         end loop;
         wait;
       end process;


end test;

这是我得到的错误:

[HDL 9-806]“std_logic_vector”附近的语法错误。 ["C:/ram/ram/ram.srcs/sim_1/new/mmu_tb.vhd":20]

感谢您的时间。

1 个答案:

答案 0 :(得分:2)

缺少:,因此第20行应为:

signal virt : std_logic_vector(15 downto 0);

和后续行类似。