3
我希望能夠指定多個通道作爲泛型,並使用它來指定包含更多參數的數組範圍。編譯時,我的Aldec編譯告訴我,'num_chan'不能被引用,直到接口列表完成。在其他泛型中使用VHDL泛型值
有沒有人知道一種方法來實現這一目標?
ENTITY deframer IS
generic (
num_chan : integer := 2;
ch_low : int_arr(num_chan-1 downto 0) := ( 1, 189);
ch_hi : int_arr(num_chan-1 downto 0) := (127, 189));
請注意,該語言允許您在此處使用無約束數組。如果你在做綜合,你的綜合工具可能不會 - 你將不得不嘗試。 –