DSim Cloud Benefits Demo Instructions

Modified on Tue, 6 Aug at 2:38 PM

DSim Cloud Benefits Demo Instructions





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:


     examples_cloud_benefits.zip


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:



This script records the start time and end time from when this script is invoked until the jobID finishes. It should be executed as soon as possible after starting the run_rs232_sims.yml script.



To execute the run_rs232_sims.yml script, enter mdc init --local-only to intialize a local workspace if you do not have one. Then enter mdc job submit run_rs232_sims.yml in the DSim Desktop terminal:



It will produce a job ID:



Immediately start the time_cloud_run.ps1 script by entering Set-ExecutionPolicy Bypass -Scope Process -Force; .\time_cloud_run.ps1 <job ID>:



To see the job in DSim Desktop, you will need to select the refresh button:



When it is done, the simulations will turn green and have check marks in the jobs portion of DSim Desktop:



and the script will report the time it took to compile and simulate:



Note that running in DSim Cloud took 616 seconds, compared to 3201 seconds when running sequentially. For this regression run in DSim Cloud, the cost to you would have been $0.70.



Conclusions

This demo shows how much faster you can run a regression in DSim Cloud versus running the regressions serially in DSim Desktop. Here are some conclusions you might reach:


  • Running a regression run sequentially is impractical


    True. This run takes an hour to run them sequentially, and it’s an artificial testcase. Real designs will often have hundreds of simulations in their regression suite and they may take hours or days to run sequentially.


  • Running a regression run in a server farm would be a more realistic comparison


    Also true. However, you would also need to compare the cost of setting up and maintaining the server farm. With DSim Desktop, the entire regression run cost $0.70. Compare that to the thousands of dollars it would have cost in machines, licenses, infrastructure, and personnel needed to run in your own server farm. You would also be constrained by the size of that server farm. What happens if your regression suite grows beyond the capacity of the server farm? What if your team needs to run multiple regression runs at the same time? With DSim Cloud, these constraints have been eliminated.


  • My regression run is small, I don’t need DSim Cloud


    Well, that is fine. Use DSim Desktop. It’s free, and uses the same DSim simulator that DSim Cloud employs. Unlike other free or low cost simulators, DSim is a fully functional SystemVerilog, VHDL, and mixed language simulator, with performance that is comparable to other commercially available simulators. And if you ever need the power of DSim Cloud, it will be easily accessible.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article