Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
juansiahaan
Posts: 44
Registered: ‎04-16-2012
0
Accepted Solution

Problem in stimulation

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

 

 

Expert Contributor
eilert
Posts: 2,059
Registered: ‎08-14-2007
0

Re: Problem in stimulation

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

 

 

Regular Visitor
juansiahaan
Posts: 44
Registered: ‎04-16-2012
0

Re: Problem in stimulation

Hi Eilert,

 

I appreciate your answer very much...thanks for your help.

 

Regards,

 

Juan