Skip to content

Commit

Permalink
Start showin the features of the system
Browse files Browse the repository at this point in the history
  • Loading branch information
suzizecat committed Jul 30, 2024
1 parent c3735f3 commit 52c1ce6
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 1 deletion.
Binary file added diplomat-lsp-src/source/img/error_reporting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diplomat-lsp-src/source/img/hier_explorer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diplomat-lsp-src/source/img/inline_values.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diplomat-lsp-src/source/img/open_wave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions diplomat-lsp-src/source/vscode/development.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Development features
====================

Code analysis
-------------------
Diplomat client relies on the `slang <https://github.com/MikePopoloski/slang>`_ open source SystemVerilog compiler to analyze code, through Diplomat Server.
It allows a management in C++ and offer great performances.

Slang also provides a great support of SystemVerilog syntax, and not only Verilog.
The supported language features are listed `in the slang documentation <https://sv-lang.com/language-support.html>`_.

The errors and warnings reported by slang will be returned to the editor and shown with squiggle lines in the editor and in the *Problems* view of VSCode.

.. figure:: /img/error_reporting.png
:align: center

Editor with reported errors

The list of available warnings is provided `in the slang warning reference <https://sv-lang.com/warning-ref.html>`_.
Only the following warnings are ignored:

**Mismatched time scales**
Reports mismatched ```timescale`` statements, often not relevant as overriden at top level for the simulation.
This is fairly annoying when dealing with source code comming from different sources.

**Missing time scale**
Reports every file without the ```timescale`` statement. Generally omitted in design files, therefore ignored.

**Unused definition**
Report every module found in the workspace that is not used in the design.
Particularly annoying when working with a library of components and not really relevant in this context.

.. note:: When a top level module is specified, the design is elaborated before reporting the errors and warning.
Thus effectively ommiting diagnostics from file that are not used in the design.
10 changes: 9 additions & 1 deletion diplomat-lsp-src/source/vscode/presentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ It features:
* Jump to definition/reference across files
* Syntax coloration
* Rename symbol
* Assisted instanciation of any module found in the workspace
* Assisted instanciation of any module found in the workspace

.. toctree::
:maxdepth: 2
:caption: Features:

development
sim_debug

50 changes: 50 additions & 0 deletions diplomat-lsp-src/source/vscode/sim_debug.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Simulation debug features
===========================

Open waveform in viewer
---------------------------

For all supported waveform type, Diplomat provides a shortcut to directly open the waveform in the appropriate external viewer.

.. figure:: /img/open_wave.png
:align: center
:scale: 75%

Open waveform menu

.. note:: As of today, only GTKWave 3 is supported

Hierarchy explorer
---------------------
Once the workspace has been properly analyzed, the hierarchy explorer will show the hierarchy tree of the workspace.
If no top-level file is selected, all potential top-level modules will be shown in the tree.

.. figure:: /img/hier_explorer.png
:align: center

Hierarchy explorer view

Selecting an element in the hierarchy explorer will open the appropriate source file and select the instance for the :ref:`inline-value-display`, if enabled.

.. _inline-value-display:

Inline value display
----------------------

Diplomat Client is able, under some conditions, to display the value from a simulation within the source code.
This is done when:

1. A simulation which top-level module matches the workspace top-level is opened through Diplomat Client action.
2. A hierarchy level is selected in the Hierarchy Explorer

Once those conditions are met, the editor will display the simulation values for the selected time directly in the editor.
Changing the position of the marker will update the values in the editor.
The traces does not need to be displayed in the viewer for the values to be retrieved.

.. figure:: /img/inline_values.png
:align: center

Editor with inline value display enabled

.. note:: As the value lookup is only meaninful in the context of the hierarchy,
please navigate your design using the Hierarchy explorer while usin gthe inline value display.

0 comments on commit 52c1ce6

Please sign in to comment.