- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problem in stimulatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-10-2012 07:36 AM
Hi everyone,
I'm making a tes bench for a code. I want to give an input (which is a std_logic) a '1' for only 10 ns after the first 80 ns.
I used the "wait for 80 ns;" statement to initiate the starting time and the input was '1' but it was constantly '1' for the whole time after that. How can I make the input '0' again after 80 ns (it's like a brief push on a push button).
Regards,
Juan
Solved! Go to Solution.
Re: Problem in stimulatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-10-2012 11:44 PM
Hi Juan,
the wait statement just sets some timing information but does not change signal values.
The scenario you described would need something like this in your stimuli process:
-- t=0
my_input <= '0'; -- initial input value
wait for 80 ns; -- initial delay
my_input <= '1'; -- input asserted
wait for 10 ns; -- signal hold time
my_input <= '0'; -- input deasserted
... -- more stimuli to follow
Another option would be to use the after statement in the assignment to the signal.
This is a little more tricky , but shorter and works concurrently as well as in a process.
Syntax may look like this:
my_input <= '0',
'1' after 80 ns,
'0' after 90 ns;
This table like style makes reading and editing easier, compared to a single line.
See, that the times are absolute here starting at the time of assingment, and increasing then.
For special modeling purtposes there are modifiers like "transport", "reject" etc. Read about the details in a textbook about VHDL.
Have a nice simulation
Eilert
Re: Problem in stimulatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-14-2012 02:43 AM
Hi Eilert,
I appreciate your answer very much...thanks for your help.
Regards,
Juan











