creating an one time delay in vhdl test bench

Status
Not open for further replies.

ananthan95

Junior Member level 3
Joined
Oct 19, 2017
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
289
I am trying to write a VHDL test bench. the issue is, I have to write a code in such a way that a delay of 1000ns has to be executed in the beginning and later on the delay period is 620ns. so what should i do?
 

Hi,

Use a counter with variable "TOP" value:

Example: counter with 100MHz clock.
Counting from 0...99 gives a 1000ns delay
Counting from 0...61 gives a 620ns delay

Klaus
 

Code VHDL - [expand]
1
2
3
4
5
6
7
8
process
  -- action code
  wait for 1000 ns;
  loop
      -- action code
    wait for 620 ns;
  end loop;
end process;

 
Hi,

yes: test bench

My solution is for chip inside solutions.

Klaus
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…