Tour of DSim Desktop

Modified on Mon, 15 Jul at 1:04 PM

Tour of DSim Desktop

Contents

  1. Introduction
  2. Prerequisites
  3. DSim Desktop extension
  4. Example design
  5. Create a project
  6. Open a project
  7. Add files to your project
  8. Add a simulation configuration
  9. Compile your design
  10. Run your design
  11. Stop running simulations
  12. Run your design in the cloud
  13. DSim Desktop terminal
  14. Next Steps

Introduction

DSim Desktop is a versatile Visual Studio Code (VSC) extension, offering unparalleled flexibility in HDL simulation, supporting both cloud-based and local (on-prem) workflows. This article gives you a tour of DSim Desktop.



NOTE: The screenshots in this article may not exactly match what you see on your computer. The functionality and performance of DSim Desktop remain the same.



Prerequisites

Install DSim Desktop.



DSim Desktop extension

The DSim Desktop view appears in the Activity Bar of the standard VSC User Interface. When you click on it, these sections appear in the Primary Side Bar:



  • DSIM DESKTOP lists your current open project, your authentication state or the option to sign in, and your billing details if signed in.
  • SIMULATION CONFIGURATION lists your defined configurations, which describe how to elaborate and simulate the design that was compiled via the LIBRARY CONFIGURATION.
  • LIBRARY CONFIGURATION lists your libraries and what files are in them.
  • LIBRARIES lists your compiled (analyzed) libraries.
  • JOBS lists your active DSim Cloud jobs associated to your current local workspace.
  • LOCAL TOOL INSTALLATIONS lists your installed versions of the DSim simulator.

If any of these sections are not visible, click ... beside DSIM DESKTOP and check the missing section.



You can move sections around your VSC UI by clicking and dragging the section headers.



Example design

For this tour, the carry_lookahead_adder example design is referenced. Though not required, you can download it here.



Create a project

Simulating designs in DSim Desktop is project-based, so the first thing you need to do is create a project.


In the VSC Explorer, navigate to the folder where you want to create your DSim Project File (.dpf), right-click the folder and select DSim Desktop: New Project.


If the folder is not visible in the VSC Explorer, open it by clicking Open Folder from the File menu.



For example, navigate to the folder /VHDL_SystemVerilog, right-click the folder /sim and select DSim Desktop: New Project.



Fill in the boxes as necessary and click Save.




Open a project

When you created your project, a DSim Project File (.dpf) was created in your Working Directory. Any changes you made in the LIBRARY CONFIGURATION and SIMULATION CONFIGURATION populate the project file. The project file can be used to share your design with others, put the design in version control, and/or continue working on the design later on. To make your design portable, share the entire project folder. For example, share the folder /carry_lookahead_adder.


To open an existing project, simply right-click the project's .dpf from the VSC Explorer and select DSim Desktop: Open Project.


For example, right-click /VHDL_SystemVerilog/sim/carry_lookahead_adder_mixed.dpf from the VSC Explorer and select DSim Desktop: Open Project.



The current open project is displayed in the DSIM DESKTOP section.




Add files to your project

As with any simulator, you need to know all the source files and their dependent files that need to be compiled, as well as what libraries they are compiled into. It is highly recommended that you use file lists to compile files of the same language and options.



General steps

1. To add a design file to your project, simply select it from the VSC Explorer, right-click, and select DSim Desktop: Configure File. Files can be either HDL files or file lists containing multiple HDL files of the same language and compile options.


2. Enter the library to which the file should compile, into the box Library Name (Optional). Otherwise, the file is compiled into the default library work.


3. Select Verilog/SystemVerilog for Verilog (.v) and SystemVerilog (.sv) files, or VHDL for VHDL (.vhd,.vhdl) files, from the drop-down menu Choose a Language. See DSim Input Filename Examples for details.


4. For file lists, tick the box Configure as file list. If the paths of the files in the file list are relative to the location of the file list, leave the File list file option selected. If the paths are relative to the Working Directory as defined in the Create a project section (ie. where DSim is invoked), select the Work directory option.


5. Enter any compile options into the box Options (Optional). For common compile options, see the DVlcom and DVhcom columns under the Standard Options section of DSim Common Options.


6. Click Save.



7. Repeat steps 1 to 6 for every file or file list you want to add to your project.


8. To add a memory file (.mif or .txt) to your project, simply add it to the folder that is your Working Directory as defined in the Create a project section. You do not have to add it to your project as described in steps 1 to 6.



Add a simulation configuration

Once you've finished adding all of your files to your project, you can add a simulation configuration. This enables you to elaborate and run different simulations on the same set of compiled libraries. To add a new simulation configuration:


1. Hover over the SIMULATION CONFIGURATION drop-down menu and click the + button.




Compile your design

1. Click the 'Compile Project' play button beside LIBRARY CONFIGURATION to compile your project.




Run your design

After the successful compilation of your design, you can run it locally (on-prem) by simply clicking the 'Run' button beside the simulation configuration under SIMULATION CONFIGURATION.




Stop running simulations

After starting a compilation, you can stop it by clicking the 'Stop Compilations' button beside LIBRARY CONFIGURATION.



You will then be asked to Cancel or Confirm.


After starting a simulation, you can stop it by clicking the 'Stop Simulation' button beside the simulation configuration under SIMULATION CONFIGURATION.



You can stop all running simulations by clicking the 'Stop Simulations' button beside SIMULATION CONFIGURATION.



You will then be asked to Cancel or Confirm.



Run your design in the cloud

When you're ready to run your simulation in the cloud, you can do it one of two ways, either with Run in DSim Cloud, or Generate and Submit Job.



Run in DSim Cloud

DSim Desktop can automatically convert your local simulation to a job file and submit it to the cloud with just one click. You must be signed into your DSim Cloud account to submit a job to the cloud.


1. Click the 'Run in DSim Cloud' button next to the desired simulation configuration.



2. A notification pops up indicating the status of your job submission. When it is complete, click the 'Show Jobs' button, or in your DSim Desktop view, expand the JOBS section to see your job.




Generate and Submit Job

DSim Desktop can automatically generate a job file from your local simulation and submit it to the cloud with just a few clicks. This enables you to view the job file, modify the job file, and submit it at anytime you want. You must be signed into your DSim Cloud account to submit a job to the cloud.


1. Right-click the desired simulation configuration and select Generate Job File.



2. The VSC Explorer indicates a new untitled file, which opens in the text editor. This is the generated job file.



3. Click the File menu, then Save As.



4. Name the job file with a .yml or .yaml extension and save it where you like. By default, it is saved in the same location as your DSim Project File.


5. If you want to modify your job file, do so and save it. Ensure the correct project for the job file is open. When you're ready to run it in the cloud, right-click the job file from the Explorer view and click DSim Desktop: Submit Job to DSim Cloud.



6. A notification pops up indicating the status of your job submission. When it is complete, click the 'Show Jobs' button, or in your DSim Desktop view, expand the JOBS section to see your job.




DSim Desktop terminal

During design compilation and simulation, all of the executed DSim simulator commands and their resulting output are displayed in the OUTPUT window. A message pops up indicating the overall result of the compile. The ? beside the libraries in the LIBRARY CONFIGURATION turn into check marks after the successful compilation of the library.


Optionally, click the 'Turn Auto Scrolling On' button (lock icon) in the OUTPUT window to have the output scroll automatically.



The DSim simulator commands can be copied into the DSim Desktop terminal window to be executed immediately, or into a script for later use. To open a DSim Desktop terminal, select it from the TERMINAL Launch Profile drop-down menu.



DSim commands can be run locally from the DSim Desktop terminal. See the DSim User Manual for details.


To make DSim Desktop your default terminal in VSC:


1. From VSC, click the View menu, then Terminal.



2. In the TERMINAL window, click the Launch Profile drop-down menu.



3. Click Select Default Profile.



4. Click DSim Desktop.



5. Confirm that DSim Desktop is now your default terminal by adding a new terminal by clicking +.



6. Your new terminal should be a DSim Desktop terminal.



7. To change your default terminal, repeat steps 2 to 6, selecting the desired terminal in step 4.



Next Steps

Try our Tutorial, or one of the Tutorials for our FPGA Vendors.


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