UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer chienpingwong
Observer
2,701 Views
Registered: ‎06-30-2011

how to do a simulation with a bidirection port in the project ?

Hi :

I am always wondering how to do a simulation with a bi-direction port in the project ? What I did was, build up two versions of Testbench. One declares it is a input port and the other declares it as an output port. 

 

Is that the only way ? Or  ...

 

Thank you

 

Jack

0 Kudos
1 Reply
Historian
Historian
2,695 Views
Registered: ‎02-25-2008

Re: how to do a simulation with a bidirection port in the project ?


@chienpingwong wrote:

Hi :

I am always wondering how to do a simulation with a bi-direction port in the project ? What I did was, build up two versions of Testbench. One declares it is a input port and the other declares it as an output port. 

 

Is that the only way ? Or  ...

 

Thank you

 

Jack


If the port pin is an inout, then one has to assume that inside the FPGA there is the proper output enable logic to drive it when required.

 

Do the same thing in the test bench. The test bench needs to declare the signal connected to that port, and drive it with a valid logic level at the appropriate time and drive it to 'Z' otherwise.

----------------------------Yes, I do this for a living.
0 Kudos