cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mulicheng
Visitor
Visitor
3,262 Views
Registered: ‎05-23-2014

mem files for simulation in non-project mode

 

I've been trying to get a tcl script to generate a mem file from our .elf file for simulation.

I've discovered generate_mem_files

 

If I follow this flow:

read_XXX ... {verilog and vhdl files}

synth_design ....

 

I can then run generate_mem_files.  

 

However, the mem file is only for simulation as the implemented bitfile is generated with updatemem instead.  In addition, for sim we have additional simulation files that are not synthesized and thus don't work with synth_design anyway.

 

So, the question is, how can I follow this flow:

 

read_XXX ... {verilog and vhdl files}

<what goes here?>

generate_mem_files ...

 

Without any setup, you get this:

WARNING: [Memdata 28-80] Empty top found while merging BMM files!
WARNING: [Memdata 28-176] There are no bmm files or elf files. Therefore Vivado could not produce any .mem files. Check the design for the existence of processors and associated elf files.

 

I can add the bmm and elf files to the list and set the properties for SCOPED_TO_REF, SCOPED_TO_CELLS etc but there is still a missing setup.  I've noticed the Vivido UI can generate the memory file if you "run simulation" without synthesis being up to date but I haven't been able to find the tcl commands that are being issued to properly set it up.

 

Using Vivado 2017.2.

Thanks

 

0 Kudos
4 Replies
hpoetzl
Voyager
Voyager
3,249 Views
Registered: ‎06-24-2013

Hey @mulicheng

 

I think VIvado is missing the .BMM file here, which you should be able to create with write_bmm (see UG835 for details).

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
mulicheng
Visitor
Visitor
3,246 Views
Registered: ‎05-23-2014

Thanks for the reply.  

 

write_bmm still says it needs an elaborated, synthesized or implemented design.  Is there a faster way to get than than with synth_design?

0 Kudos
hpoetzl
Voyager
Voyager
3,231 Views
Registered: ‎06-24-2013

Hey @mulicheng

 

I think you should be able to use data2mem directly without the .BMM file but you need to know how the data needs to be layed out for your memory cell/device and specify that on the commandline (with the -mf option).

 

Haven't tested that though and might be completely wrong here.

 

All the best,

Herbert

-------------- Yes, I do this for fun!
mulicheng
Visitor
Visitor
3,221 Views
Registered: ‎05-23-2014

Thanks @hpoetzl

 

The -mf option wasn't very friendly but I started looking at the .bmm file in the output products for the mcs to see if I could translate it over.  The .bmm file can't work as output because it has a WORKFLOW_OPERATION header that only works inside the UI and data2mem complains.  But that got me to thinking why not just comment that out for use with data2mem.  

 

After that it was a simple:

 data2mem -bm bd_fc5c.bmm -bd <my elf fiel> -bx .

 

And I got the same .mem file that the UI generates.

 

Thanks for the input, this'll get me down the road to simulating a little easier since my other thread doesn't have a resolution yet.  We can simulate in command line mode instead of trying to get the UI to work for the time being.

 

0 Kudos