Tutorial: Advanced Regressions

Modified on Wed, 18 Sep at 10:52 AM

Tutorial: Advanced Regressions

Introduction

DSim Cloud empowers regressions to automate the simulation of your designs. After completing the Tutorial: Regressions and understanding Task Fanout, you are ready to go through this tutorial for Advanced Regressions usage.


You do not need an active remote workspace to run jobs. Billing is different for Jobs and Interactive usage.


For this tutorial, we will use the axi2mba example design. We use the Task Fanout feature to compile and simulate up to 3,000 test cases in parallel in the cloud.


NOTE: this tutorial can use up many simulation minutes and should only be performed if you have a paid Metrics account. For example, running 1,500 test case will cost about $10.


Using the power of DSim Cloud, we run the test case regression in one job as follows:


  1. Compile the full source code into multiple libraries, using one job task.
  2. Elaborate the design just once into one image, using one job task.
  3. Simulate the design for up to 3,000 test cases, using one job task that fanouts to multiple generated tasks.

This results in a simulation time of only about 8 minutes for 1,500 test cases run in the cloud in parallel. Compare this to running the test cases sequentially, which takes about 9.5 hours! This is the time savings you can gain by harnessing the power of running your regressions in DSim Cloud.



Procedure

1. Download the axi2mba example design and extract the zip file into a folder with read/write access.


2. Open the folder and rename the subfolder examples_axi2mba-main to examples_axi2mba.


3. Open the job file /examples_axi2mba/dsim/axi2mba-fanout-basic.yaml in a text editor and study it to understand how all test cases are simulated and what artifacts are available. Refer to the Introduction above. By default, only 1 test case is run, with a random simulation time sim_time value between 20 and 25 ms.


4. Open a supported terminal shell to /examples_axi2mba.


5. Initialize a local workspace.


 

mdc init --local-only

 


6. Navigate to the dsim folder.


 

cd dsim

 


7. Use mdc job submit to execute the job.


 

mdc job submit axi2mba-fanout-basic.yaml

 


A unique auto-generated job-id will be displayed in your terminal for every job submitted. Note this job-id and use it for all subsequent job commands for a particular job. For example,


 

Job Submitted.
Job Id: axi2mba-fanout-simtime-xxxxx

 


8a. Use mdc job status to view the current status of your job. Run it everytime you want to refresh the status. For example,


 

mdc job status axi2mba-fanout-simtime-xxxxx

 


8b. Alternatively, use mdc job status with the -w option to view the status of your job. This will auto-refresh the status, but blocks you from executing anymore commands until the entire job is complete. So you may want to open another terminal in your local workspace if you want to execute commands while the job is running. For example,


 

mdc job status axi2mba-fanout-simtime-xxxxx -w

 


9. Once a task is completed, optionally use mdc job log to view the captured output from that task. For example,


 

mdc job log axi2mba-fanout-simtime-xxxxx library

 


10. Once a task is completed, use mdc job download to download any artifacts from that task. For example,


 

mdc job download axi2mba-fanout-simtime-xxxxx elab-log

 


11. Change the number of test cases run in the cloud in parallel by changing the count value of the sim-test2-sim task in the job file axi2mba-fanout-basic.yaml (line 55) to a maximum value of 2998. Note that the greater the value of count, the longer the job will take to complete, as count refers to the number of test cases run.


12. Change the to value (line 57) such that | to - from | is greater than count but less than 1000000. Note that the greater the value of to, the longer each test case can run, since the from and to values are the unique random simulation times of test cases, in ms. This also means larger values of to will result in longer job completion times.


12. Save axi2mba-fanout-basic.yaml and repeat steps 7 to 11 for new jobs. Jobs can be executed in parallel. Use mdc job list to list the jobs. By default, only the latest 10 jobs are listed, from newest to oldest, from your current local workspace.


 

mdc job list

 


12. Use mdc job kill to kill a running job. For example,


 

mdc job kill axi2mba-fanout-simtime-xxxxx

 


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