我编写了一些 vivado RTL,然后在实体的端口中添加了一些 vhdl 属性,以定义到 Xilinx Vivado 工具的接口,如下所示:
library ieee;
use ieee.std_logic_1164.all;
entity vivado_rtl_island is
port(
-- Clocks
i_m50_clk :in std_logic;
i_m50_rst :in std_logic;
-- APB Command Inteface
s_paddr :in std_logic_vector(31 downto 0);
s_psel :in std_logic;
s_penable :in std_logic;
s_pwrite :in std_logic;
s_pwdata :in std_logic_vector(31 downto 0);
s_pready :out std_logic;
s_prdata :out std_logic_vector(31 downto 0);
s_pread :out std_logic;
s_pslverr :out std_logic
);
end entity;
architecture rtl of vivado_rtl_island is
-- Define APB Interface for "Vivado IP Integrator"
ATTRIBUTE X_INTERFACE_INFO: STRING;
ATTRIBUTE X_INTERFACE_INFO of s_paddr: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PADDR";
ATTRIBUTE X_INTERFACE_INFO of s_psel: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PSEL";
ATTRIBUTE X_INTERFACE_INFO of s_penable: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PENABLE";
ATTRIBUTE X_INTERFACE_INFO of s_pwrite: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PWRITE";
ATTRIBUTE X_INTERFACE_INFO of s_pwdata: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PWDATA";
ATTRIBUTE X_INTERFACE_INFO of s_pready: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PREADY";
ATTRIBUTE X_INTERFACE_INFO of s_prdata: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PRDATA";
ATTRIBUTE X_INTERFACE_INFO of s_pslverr: SIGNAL is "xilinx.com:interface:apb:1.0 APB_S PSLVERR";
begin
end architecture;
在那里,我尝试使用 GHDL 编译上述 rtl,如下所示:
$ ghdl -a --std=08 --ieee=synopsys --work=work vivado_rtl_island.vhd
GHDL 产生以下错误:
vivado_rtl_island.vhd:28:33: no "s_paddr" for attribute specification
vivado_rtl_island.vhd:29:33: no "s_psel" for attribute specification
vivado_rtl_island.vhd:30:33: no "s_penable" for attribute specification
vivado_rtl_island.vhd:31:33: no "s_pwrite" for attribute specification
vivado_rtl_island.vhd:32:33: no "s_pwdata" for attribute specification
vivado_rtl_island.vhd:33:33: no "s_pready" for attribute specification
vivado_rtl_island.vhd:34:33: no "s_prdata" for attribute specification
vivado_rtl_island.vhd:35:33: no "s_pslverr" for attribute specification
但是,当我用 modelsim 编译它时,它不会产生错误。
有谁知道如何在 GHDL 中解决这个问题,以便我可以添加这些属性,模拟器会忽略它们而不产生错误?