DSim Cloud Benefits Demo Instructions
- Introduction
- Prerequisites
- Get the Demo Design
- Open the DSim Project File
- Run one Test using DSim Desktop
- Run the Tests Sequentially
- Run the Tests in DSim Cloud
- Conclusions
Introduction
The purpose of this demo is to illustrate how you can save money and time by using DSim Cloud. We will show you how typical simulations are done today, how to do the same set of simulations in DSim Cloud and then show you how much time and money you will save using DSim.
Prerequisites
DSim Desktop | |
DSim Cloud CLI (mdc) |
Note: After installing DSim Desktop and the CLI, you should re-start VSCode.
Get the Demo Design
Get the zip file for the testcase:
Put the zip file in the folder where you would like to install the testcase.
Right-click on the zip file and choose Extract All…
Now you can either follow the video or instructions below, or both.
Open the DSim Project File
In Visual Studio Code, Left-click on the Explorer icon, then Left-click on the Open Folder button.
Navigate to the folder containing the extracted testcase.
Select the examples_cloud_benefits-main folder then click the Select Folder button.
Right-click on the dsim_for_all_demo.dpf file then select the DSim Desktop: Open Project menu option.
Run one Test using DSim Desktop
First, compile the design by Left-clicking on the play icon to the right of LIBRARY CONFIGURATION.
If the compilation is successful, the libraries will turn green and there will be check marks to the right.
Next, run the first test by Left-clicking on the play icon to the right of sim0 under SIMULATION CONFIGURATION:
If it is successful, it will turn green and there will be a check mark to the right.
You can also see the results under the OUTPUT tab:
Run the Tests Sequentially
NOTE: The instructions below using run_sequentially.ps1 and time_cloud_run.ps1 are for Windows. If you're on Linux, use run_sequentially.sh and time_cloud_run.sh instead.
Open the run_sequentially.ps1 file by Left-clicking on the Explorer icon, then Left-clicking on the run_sequentially.ps1 file, which will open it in a text editor tab.
This file will run the tests in the same manner as we ran the first test using DSim Desktop. Here, we compile the files, then elaborate the testcase:
Here we simulate:
Observe that we loop 32 times, giving each simulation a different seed.
Note: If you don't want to wait the one hour it will take to run this regression, simply reduce the 31 in this loop and the demo will complete faster.
We record the start and end times, for compile:
and simulation separately:
To run the script, Left-click on the TERMINAL tab. All commands have to be executed in the DSim Desktop terminal by selecting it from the terminal drop-down menu. Make sure that the terminal is in the test folder (testcase) then execute the script by entering Set-ExecutionPolicy Bypass -Scope Process -Force; .\run_sequentially.ps1 in the terminal if you're on Windows. If you're on Linux, enter sh run_sequentially.sh.
Note:This step takes about 60 minutes, and can be skipped
While the script is executing, you should see each test report Test Finished with NO error!!
The final test will be seed number 31. The script will report the simulation time in seconds.
Run the Tests in DSim Cloud
Left-click on the Explorer icon and Left-click on the run_rs232_sims.yml file which will open it in a text editor tab.
Notice that this file has the same DSim commands as were used in the other approaches. Here, we do the compilation steps:
The fanout section of the file controls the loop through the simulations:
Here is the simulation command using the fanout seed:
Here we specify the artifacts we want to get back from the cloud:
We are going to use the time_cloud_run.ps1 file to record the time spent running in the cloud. Open the file Explorer and Left-click on the time_cloud_run.ps1 script which will open it in a text editor tab: