VS Code extension

Debug and optimize

Diagnose a failing design, or make a working one smaller, without leaving the editor.

Debug finds out why a design misbehaves. Optimize makes a working design smaller or shallower. Both come back with a proposal you review as a diff, and neither changes a file until you say so.

Debugging a design

  1. 1

    Pick Debug

    On a new chat, choose the Debug card and the project to look at. In a chat that already has code, switch the task menu to Debug instead.

  2. 2

    Fill in the short form

    Say where it fails (in simulation or in synthesis), what should happen, and what happens instead. Add a repro or paste a log opens two more fields for how to reproduce it and any log or error you already have.

    If you have a waveform from the failing run, Choose .vcd attaches it. It is optional, and often the fastest way to a clear answer.

  3. 3

    Send, then read the diagnosis

    The diagnosis says whether the root cause was found, where it is, and the evidence behind it. Click the file and line to jump straight there in your editor.

    DiagnosisRoot cause found

    Root cause

    rtl/fifo.v:42

    The write pointer advances while the FIFO is full, overwriting the oldest word.

    Proposed fixre-simulated
    Apply fixReview diffDismiss
    A diagnosis with its proposed fix.

More on the form and on each verdict: Reporting the bug and Reading a diagnosis.

Optimizing a design

  1. 1

    Pick Optimize

    On a new chat, choose the Optimize card and the project. In an existing chat, switch the task menu to Optimize.

  2. 2

    Choose what to optimize for

    Area, Timing or Balanced, how much effort to spend, and which device family to measure against. Point it at something specific lets you name the top module, a part to focus on, or anything it must not touch.

  3. 3

    Send, then read the result

    You get the numbers before and after, anything that got worse, and whether the rewrite was confirmed to behave exactly like the original.

The numbers are estimates, not results from your vendor's toolchain; see Reading the numbers and Reading the result.

Applying a fix or a rewrite

  • Review diff opens the proposed change beside your current files.
  • Apply fix (or Apply rewrite) writes it to your project in one step, and Undo takes it back. Edits of your own are merged, never overwritten, exactly as described in Working in your project.
  • Dismiss sets it aside. Nothing is changed.

Check this before applying

If a proposal removes or weakens a check in your testbench, the card says so in a warning above the buttons. Read that part of the diff before you apply.

If SiliCode's copy of the project changed after the proposal was made (a later turn edited the same files), applying is blocked and the card lists the files that moved on. Ask again and you get a proposal made against the current code. Edits you made locally do not block it; they are merged when the proposal is applied. See Applying a proposed fix.