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!

Reply

Include .txt files for xsim simulation

Accepted Solution Solved
Highlighted
Adventurer
Posts: 53
Registered: ‎03-27-2017
Accepted Solution

Include .txt files for xsim simulation

I have files text1.txt text2.txt text3.txt that get read by $readmemh in my testbench. Using the vivado GUI, I get no errors when I manually add these .txt files as simulation source files.

 

How do I include these files as simulation source files when I'm using the command line (xvlog, xelab, xsim) like I've done using the GUI?


Accepted Solutions
Xilinx Employee
Posts: 181
Registered: ‎09-13-2014

Re: Include .txt files for xsim simulation

When you are using command line, simply copy these text file into the directory where you are running xvlog/xelab/xsim.

 

 

View solution in original post


All Replies
Moderator
Posts: 5,300
Registered: ‎08-01-2008

Re: Include .txt files for xsim simulation

I suggest you recommend that they use the Vivado run_simulation -scripts_only option to dump compile scripts and see how to set up the libraries as well
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
Xilinx Employee
Posts: 125
Registered: ‎04-24-2013

Re: Include .txt files for xsim simulation

Hi @bfung,

 

If the simulation is running correctly in the GUI then you can use the command export_simulation to generate a script that will allow the simulation to be run from the command line.

 

The format is similar to this:

 

export_simulation -simulator xsim -directory /path_to_where/to_store_files

 

If you type export_simulation -help into the tcl console it will give you the full syntax.

Best Regards
Aidan

 

------------------------------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if this answered your question
Give Kudos to a post which you think is helpful and may help other users
------------------------------------------------------------------------------------------------------------------

Xilinx Employee
Posts: 181
Registered: ‎09-13-2014

Re: Include .txt files for xsim simulation

When you are using command line, simply copy these text file into the directory where you are running xvlog/xelab/xsim.

 

 

Adventurer
Posts: 53
Registered: ‎03-27-2017

Re: Include .txt files for xsim simulation

Thank you @balkris @amaccre @dprasad

 

These are all good suggestions - but @dprasad suggested what I was seeking (I can't believe I didn't think of this!)