Hallo zusammen,
ich habe in einem package folgendes definiert:
1 | type t_sent_in is
|
2 | record
|
3 | cfg : std_logic_vector (31 downto 0);
|
4 | data : std_logic_vector (31 downto 0);
|
5 | secsns : std_logic_vector (31 downto 0);
|
6 | ser_data : std_logic_vector (31 downto 0);
|
7 | ser_cfg : std_logic_vector (31 downto 0);
|
8 | end record;
|
9 | constant C_SENT_IN : t_sent_in := (
|
10 | (others => '0'),
|
11 | (others => '0'),
|
12 | (others => '0'),
|
13 | (others => '0'),
|
14 | (others => '0')
|
15 | );
|
16 | type t_sent_in_4ch is array (0 to 3) of t_sent_in;
|
(In der 'constant' sollen spaeter mal sinnvolle Defaultwerte stehen,
hier einfach mal alles genullt). Im Toplevel das package eingebunden.
Jetzt im Toplevel die Signaldeklaration mit Initialisierung:
1 | signal sent_in_regs : t_sent_in_4ch := (C_SENT_IN, C_SENT_IN, C_SENT_IN, C_SENT_IN);
|
Frage: Geht das einfacher/generischer? Ich habe mit 'signal sent_in_regs
: t_sent_in_4ch := (others => (others => '0'))' sowie 'signal
sent_in_regs : t_sent_in_4ch := (others => (others => C_SENT_IN))'
rumgespielt, da hat GHDL aber rumgezickt...
Versteht jemand mein Problem :o) und hat 'nen guten Tipp dazu?