S
stevem1
Guest
I am modeling some bus control signals that need to change after a
rising master clock.
I control these signals from inside a task that I call from the main
testbench. I call this
task asynchronous to the master clock, so I put a wait (CLK) statement
inside the task
and before I modify any control signals, in order to synchronize the
control signals to the master clock.
This kindof works but the control signals are changing after the
positive and negative
edges of the clock.
So maybe you can't use a "wait (CLK)" inside a task. It appears that
you can only use a "wait (CLK)"
inside an "always" statement or an "initial" statemnet. Is this
correct ?
If so, then I need to do the synchronization outside of the task, and
at the test bench level, before
calling the task. This isn't obvious reading the LRM.
-steve
rising master clock.
I control these signals from inside a task that I call from the main
testbench. I call this
task asynchronous to the master clock, so I put a wait (CLK) statement
inside the task
and before I modify any control signals, in order to synchronize the
control signals to the master clock.
This kindof works but the control signals are changing after the
positive and negative
edges of the clock.
So maybe you can't use a "wait (CLK)" inside a task. It appears that
you can only use a "wait (CLK)"
inside an "always" statement or an "initial" statemnet. Is this
correct ?
If so, then I need to do the synchronization outside of the task, and
at the test bench level, before
calling the task. This isn't obvious reading the LRM.
-steve