Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>kratos-vscodeNew to Visual Studio Code? Get it now.
kratos-vscode

kratos-vscode

Keyi Zhang

|
1,130 installs
| (0) | Free
Debugger for kratos generators
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Kratos Visual Studio Code Debugger Extension

This is a VS Code Extension for debugging hardware generated by Kratos. It supports step, continue, and breakpoints.

To use it, you have to enable the debug database dump when you call verilog() function in Kratos:

verilog(design, debug_db_filename="debug.db")

This will dump a database file called debug.db in your current working directory.

Using Kratos VS Code Debugger Extension

  • Install the extension in VS Code. You can search kratos-vscode in the extension page.

  • Compile kratos-runtime, which can be obtained from here.

  • Start your favorite Verilog simulator:

    • For Verilator, make sure you enable --vpi, put initialize_runtime() before your test bench. For details see here. You also need to inject Verilator-specific debug info as a pass before producing your design files:
      _kratos.passes.insert_verilator_public(design.internal_generator)
      
    • For ncsim, make sure you load the runtime library and provide entry point:
      irun test_tb.sv test.sv -sv_lib libkratos-runtime.so -loadvpi libkratos-runtime.so:initialize_runtime_vpi -access +r
      
  • Open your working directory where you generate the design as well as the debug database

  • Run Debug (or press F5) and choose Kratos

  • Enter your debug file name, e.g., debug.db

  • You can now debug the kratos design as if debugging software!

Demo

Using Module Viewer

Once you're in the debugging session, open the command prompt (or pressing F1), then type Kratos. You will see an option of Kratos module viewer. Once you open it, you can see the visualization of all different modules in different hierarchy.

Here is a list of available actions you can take on the module viewer:

  • Hover mouse on any module will show the full name.
  • Double click a module will "zoom in" into that instance scope
  • Double click the empty background will bring you one level back in the hierarchy.
  • Click Break on Clock Edge: On will disable the break on clock edge.

Graph demo

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft