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: 
Visitor rubana
Visitor
7,924 Views
Registered: ‎06-08-2016

test bench file

Jump to solution

I want to be able to upload the values of the various inputs into my test bench through and external text file in which the test bench should handle the capacity to understand the allocation of the various inputs against the values entered in the text file and should simulate accordingly . How do i do that?

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
15,491 Views
Registered: ‎01-16-2013

Re: test bench file

Jump to solution

@rubana,

 

Check the following Links which explains on readmemh equivalent command in VHDL with examples. Hope it helps.

 

--Syed

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

Did you check our new quick reference timing closure guide (UG1292)?
---------------------------------------------------------------------------------------------
0 Kudos
3 Replies
Moderator
Moderator
7,921 Views
Registered: ‎01-16-2013

Re: test bench file

Jump to solution

@rubana

 

For verilog you can use $readmemh() for such task. This will read text file that contains hex values into array.
Google to know more about this command and also refer to the below forum thread:

https://forums.xilinx.com/t5/Simulation-and-Verification/How-to-use-readmemh-in-Vivado-2013-4-simulator/td-p/402263

 

--Syed

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

Did you check our new quick reference timing closure guide (UG1292)?
---------------------------------------------------------------------------------------------
0 Kudos
Visitor rubana
Visitor
7,918 Views
Registered: ‎06-08-2016

Re: test bench file

Jump to solution

what about vhdl?

0 Kudos
Moderator
Moderator
15,492 Views
Registered: ‎01-16-2013

Re: test bench file

Jump to solution

@rubana,

 

Check the following Links which explains on readmemh equivalent command in VHDL with examples. Hope it helps.

 

--Syed

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

Did you check our new quick reference timing closure guide (UG1292)?
---------------------------------------------------------------------------------------------
0 Kudos