Start Signal with Zero Value

A

a_Conan

Guest
Hi,
Suppose I write:

package MyVariables is
constant M : integer := 4;
constant N : integer := 9;
constant MN : integer := M*N ;
constant TRUE : integer := 1;
constant FALSE : integer := 0;
type Location is record
row : integer;
col : integer;
val : real;
end record;
type MyArrayM is array (0 to M) of Location;
type KM is array (0 to M) of integer;
type KF is array(0 to M, 0 to M) of integer;
end MyVariables;
..
..
..
Signal W1 : MyArrayM;
Signal W2 : KM;
Signal KF : KF;

My question: how can I assign all signals with Zeros ( Default value
before any calculations)
Thank You
 
If it is for pure synthesis mode - you need reset signal and logic
associated, for pure simulation, simple inline initialization should
suffice. Like:

Signal W2_0 : KM := (others => 0);

HTH
Ajeetha
www.noveldv.com
 
Thank you Ajeetha , but what about this:

type UM is array(0 to 5, 0 to 4) of unsigned(0 to 7);

signal W : UM;

how can I initialize the W signal with 0 ? ca I use

Signal W : UM := (others => 0);

Thanks
 
Thank you I found it as :

signal cy : MN := ( others =>( others => "00000000" ));

Thanks again
 
Or, range independent :

signal cy : MN := ( others =>( others => (others => '0' ));


"a_Conan" <hailconan@gmail.com> wrote in message news:1125377833.047109.270180@g44g2000cwa.googlegroups.com...
Thank you I found it as :

signal cy : MN := ( others =>( others => "00000000" ));

Thanks again
 

Welcome to EDABoard.com

Sponsor

Back
Top