Generics 为什么可以';t我使用带有“的泛型”;其他=>&引用;陈述
在下面的代码中,Questa SIM 2019.3将启动解析为未知值U。Generics 为什么可以';t我使用带有“的泛型”;其他=>&引用;陈述,generics,Generics,在下面的代码中,Questa SIM 2019.3将启动解析为未知值U。 似乎我无法将泛型传递给“others=>”语句,如图所示 entity sync is generic ( STAGES : integer := 16; STARTUP : std_logic := '0' ); port ( clk : in std_logic; rstn : in std_logic; ina
似乎我无法将泛型传递给“others=>”语句,如图所示
entity sync is
generic (
STAGES : integer := 16;
STARTUP : std_logic := '0'
);
port (
clk : in std_logic;
rstn : in std_logic;
ina : in std_logic;
outa : out std_logic
);
end sync;
architecture behavioral of sync is
signal dff : std_logic_vector(STAGES-1 downto 0);
begin
out <= dff(STAGES-1);
process(clk,rstn) begin
if (rstn='0') then
dff<=(others=>STARTUP);
elsif rising_edge(clk) then
dff <= dff(STAGES-2 downto 0) & ina;
end if;
end process;
--
end behavioral;
实体同步已启动
通用(
阶段:整数:=16;
启动:标准逻辑:=“0”
);
港口(
clk:标准逻辑中;
rstn:标准逻辑中;
ina:标准逻辑;
outa:out标准逻辑
);
结束同步;
行为同步的体系结构是
信号dff:std_逻辑_向量(从1级下降到0级);
开始
出来