Altera_Forum
Honored Contributor
14 years agoWill Quartus support generic types?
Hi there,
I wonder if anyone has an idea how to achieve Generic Types, i.e., something like:
package fifo_pkg is
generic (type element_type);
type fifo_in_type is record
data_in : element_type;
rd : std_logic;
wr : std_logic;
end record;
type fifo_out_type is record
data_out : element_type;
empty : std_logic;
full : std_logic;
end record;
component fifo is
generic
(
MIN_DEPTH : integer;
DATA_WIDTH : integer
);
port
(
clk : in std_logic;
res_n : in std_logic;
i : in fifo_in_type;
o : out fifo_out_type
);
end component fifo;
end fifo_pkg;
so that one can use smth like:
package wide_fifo_pkg is new fifo_pkg
generic map (type => std_logic_vector(31 downto 0));
with the current version of quartus? Version 11.0sp1 of Quartus does not allow to synthesize the code above. I wonder if there are other ways to achieve the same flexibility with today's synthesis/vhdl 2008 support of quartus. Does anyone have a nice suggestion here? Does anyone know if that will be possible with the upcoming version of quartus? Thanks a million, T (ps: this is somehow a cross-posting of: http://stackoverflow.com/questions/7925361/passing-generics-to-record-port-types, i posted here because i guess that the community here will be more quartus-focused, and might have a clue when this will be integrated in quartus)