Hallo ich habe folgendes Problem.
Ich habe folgendes package deklariert:
1 | package modulator_top_level_defs is
|
2 |
|
3 |
|
4 | -- arrays of std_logic_vectors
|
5 | type t_std_logic_vector_array is array (natural range<>) of std_logic_vector;
|
6 | type t_signed_array is array (natural range<>) of signed;
|
7 | type t_unsigned_array is array (natural range<>) of unsigned;
|
8 |
|
9 | end package modulator_top_level_defs;
|
ModelSim 10.0a leider noch keine unconstrained Array-Elemente(VHDL
2008).
Synthesefähig ist es mit Quaruts 10.1 .
Ein zweidimensionales array(m downto 0, n downto 0) of std_logic
scheidet leider aus da ich die einzelnen zeilen als std_logic_vector
(unsigned, signed) haben möchte und ich die Dimensionen über generics
bestimmen will.
Ich brauche dieses Package für mehrere Module da die Module als
Eingangs- bzw. Ausgangsdatentyp diese Typen haben.
Bsp:
1 | entity x is
|
2 |
|
3 | generic(
|
4 | g_NOF_STAGES : natural := 4;
|
5 | g_IQ_WIDTH : natural := 18
|
6 | );
|
7 |
|
8 | port( i_clk : in std_logic; -- sample clock of input data
|
9 | i_rst_b : in std_logic;
|
10 | i_data_i : in std_logic_vector(g_IQ_WIDTH-1 downto 0); -- I-part of complex signal
|
11 | i_data_q : in std_logic_vector(g_IQ_WIDTH-1 downto 0); -- Q-part of complex signal
|
12 |
|
13 | i_step_value : in std_logic_vector(g_IQ_WIDTH-1 downto 0);
|
14 |
|
15 | o_data_i : out t_std_logic_vector_array(g_NOF_STAGES-1 downto 0)(g_IQ_WIDTH-1 downto 0 );
|
16 | o_data_q : out t_std_logic_vector_array(g_NOF_STAGES-1 downto 0)(g_IQ_WIDTH-1 downto 0 )
|
17 | );
|
18 |
|
19 | end entity x;
|
Jetzt ist meine Frage wie kann ich das Package bzw Entity so umschreiben
dass ich das fertige Modul mit ModelSim simulieren kann?
Viele Grüße und schon mal danke.
Jürgen