How do you do a memory model preload?

Have you ever tried to read bursts of data from any memory model before even writing any data? If so, you had to encounter “x” from all read addresses. Of course, this ”x” is not valid data to be read. There are two ways to do it. 

A hard one that takes a lot of simulation time, is to write the data via communication protocol to all addresses, or an easier way is to do a memory model preload. Memory preload is done inside the top testbench.

How do you do a memory preload?

String CMD_LINE_ARG can be defined as an argument in xrun script with next definition: +CMD_LINE_ARG
String SIM_TEST_PATH can be defined as an argument in xrun script with next definition: +SIM_TEST_PATH=<path>

Preload_check_file.txt is a file stored inside the simulation results dir and if a successful preload is done, you can see the exact same data that should be preloaded from the .dat file.
Otherwise, you could find a similar message:

How do you do a memory preload?

We could preload the memory model with parameters. That does not give us the flexibility that in every test case we have a specific preload, but also not a particular elaborated snapshot.
This is why we propose an upgrade of the basic solution with parameters.
Every time, as we change parameter value and start the elaboration, we get another elaborated snapshot. Because of this, we do not always want to change parameters.
This solution enables us a one elaboration snapshot, but many different test cases will have a specific preload per need.

Contact Us

Please, enter your details below. We will get back to you as fast as we can.

This website uses cookies to ensure you get the best experience on our website.

Get Cogita

Please, enter your details below. We will get back to you as fast as we can.

Thank you!

We will get in touch soon.

Get a Quote

Please, enter your details below. We will get back to you as fast as we can.