Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > clk event at firs simulation cycle

Reply
Thread Tools

clk event at firs simulation cycle

 
 
valtih1978
Guest
Posts: n/a
 
      09-04-2012
signal w_clk : std_logic := '1' ;

The clock condition does not pass on the first sim cycle in Modelsim. Why?

read_stimuli : process(w_clk)
if(w_clk'event and w_clk='1') then

 
Reply With Quote
 
 
 
 
Nicolas Matringe
Guest
Posts: n/a
 
      09-04-2012
Le 04/09/2012 14:03, valtih1978 a écrit :
> signal w_clk : std_logic := '1' ;
>
> The clock condition does not pass on the first sim cycle in Modelsim. Why?
>
> read_stimuli : process(w_clk)
> if(w_clk'event and w_clk='1') then
>

Because there's no event on clock.
Assigning a default value in the declaration doesn't generate en event.

Nicolas
 
Reply With Quote
 
 
 
 
valtih1978
Guest
Posts: n/a
 
      09-05-2012
Because LRM has the following section?

The initialization phase consists of the following steps:
c) The signals in the model are updated as follows inan order such that
if a given signal R depends upon the current value of another signal S,
then the current value of S is updated prior to the updat-ing of the
current value of R:
— The driving value and the effective value of eachexplicitly declared
signal are computed, and the variables representing the driving value
and current value of the signal are set to the driving value and
effective value, respectively. The current value is assumed to have been
the value of the signal for an infinite length of time prior to the
start of simulation. If a force, deposit, or release was scheduled for
any driver or signal, the force, deposit or release is no longer
sched-uled for the driver or signal.
— The value of each implicit signal of the formS'STABLE(T) or S'QUIET(T)
is set to TRUE. The value of each implicit signal of the form
S'DELAYED(T) is set to the initial value of its prefix, S.

 
Reply With Quote
 
Gabor
Guest
Posts: n/a
 
      09-05-2012
valtih1978 wrote:
> Because LRM has the following section?
>
> The initialization phase consists of the following steps:
> c) The signals in the model are updated as follows inan order such that
> if a given signal R depends upon the current value of another signal S,
> then the current value of S is updated prior to the updat-ing of the
> current value of R:
> — The driving value and the effective value of eachexplicitly declared
> signal are computed, and the variables representing the driving value
> and current value of the signal are set to the driving value and
> effective value, respectively. The current value is assumed to have been
> the value of the signal for an infinite length of time prior to the
> start of simulation. If a force, deposit, or release was scheduled for
> any driver or signal, the force, deposit or release is no longer
> sched-uled for the driver or signal.
> — The value of each implicit signal of the formS'STABLE(T) or S'QUIET(T)
> is set to TRUE. The value of each implicit signal of the form
> S'DELAYED(T) is set to the initial value of its prefix, S.
>

"The current value is assumed to have been the value of the signal for
an infinite length of time prior to the start of simulation."

That seems to state pretty clearly that there is no event at time zero.
You could of course use a process to start the clock at time zero,
and it would create an event - going from undefined to 1 (assuming
you don't initialize the clock to 1 in the declaration).

-- Gabor
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
with clk'event, must we use clk='1' or clk='0' ? sunshinekisses@gmail.com VHDL 18 08-09-2007 10:42 PM
Post-Route Simulation does not give output for the first clock cycle Options velocityreviews Software 0 04-17-2007 04:47 PM
Post-Route Simulation does not give output for the first clock cycle Drew VHDL 0 04-17-2007 04:25 PM
Necessity of clk'event in Process Lord_MiL VHDL 1 03-20-2007 09:30 PM
MCTS .NET Framework 2.0 Web Applications: which exam to study firs tg MCAD 0 09-13-2006 03:42 AM



Advertisments