Search code examples
vhdlsimulationvivado

Where to put a .txt file if I want to read it out from the integrated Simulator in Vivado?


I have a text-file I want to read in inside my simulation.vhd file but I do not know where to put it so that the code finds it, since I am not quite sure where it gets executed.


Solution

  • The simulator executes in the .sim folder - but this folder gets reset everytime when you start the simulation. Therefore the .txt file must be outside the sim folder and the the simulation.vhd you need to give a full path to the file like this:

       stimuli : process                                                                             
       file infile: text open read_mode is "C:\Users\Name\F\L\lena_sw.txt";