JanusHDL

The GUI

Last updated: 

jhdlw is JanusHDL's window. It shows waveforms, browses the design, edits code, keeps projects and runs simulations, which you can pause, continue, run for a while and restart while the design stays loaded. This chapter is about the window as a whole and about running simulations in it; the next chapters cover the waveform viewer, the insight panels and the code editor.

Starting the window

jhdlw                              # the start page
jhdlw run.jhw                      # open a waveform database (or a .vcd file)
jhdlw uart.jhdlproj                # open a project
jhdlw --run uart.jhdlproj          # open a project and run it
jhdlw --run design.f --top work.tb --stop-time 1ms   # run a file list

Command reference lists every argument. Options may come before or after the file, in any order; an unknown option is an error that shows the usage.

You can also drop a file on the window: a waveform (.vcd, .jhw) opens, a project (.jhdlproj) opens as the project, a wave setup (.wavesetup) is applied to the waveform shown, and a file list (.f) or VHDL file (.vhd, .vhdl) is simulated straight away.

The start page

Until a waveform is open, the Waves tab shows the start page:

  • Start: open a project, make a new one, run a simulation, open a waveform, open the demo waveform, simulate the built-in VHDL demo design, and show all commands, each with its key.
  • Recent: your last projects, simulation runs and waveforms, each with its folder. Click a project or waveform to open it; click a run to open the Run dialog filled in with it.

The demo waveform and the demo design are there to try the viewer without a design of your own.

The window

The window has a menu bar, a toolbar, an area of tabs, and a status bar.

Menus. File (waveforms, projects, wave setups, saving the waves as an image, files in the editor, demos, quit), Edit (find and replace, go to line, comments, folding), View (the command list, which tabs show, the editor's panes, the layout, zoom, theme), Simulate (run and control simulations, clear the terminal), Signals (the wave view: adding and removing signals, dividers and expressions, changes, values, markers, the insight panels) and Help (keyboard shortcuts, licenses, about).

Toolbar, from the left:

Control What it does
Open waveform Open a .vcd or .jhw file (Ctrl+O)
Run simulation… The Run dialog (Ctrl+Shift+R)
Run / Continue / Run again Runs, continues a paused run, or runs again from time 0 after the end (F5)
Pause, Stop, Restart Control the run (F6, Shift+F5, Ctrl+Shift+F5)
The time box and Run for Run on for the time in the box (F10); the box takes a time such as 10 us or 250 ns, and turns red if it is not one
Zoom to fit, Zoom in, Zoom out The wave view's time scale (F, +, −)
Previous change, Next change Move the cursor to the selected signal's previous or next change (Ctrl+←, Ctrl+→)
Search commands The command palette (Ctrl+Shift+P)
The palette button The theme

Status bar. On the left, how the simulation stands, colored by its state: in the accent color (blue in the default themes) while it is analyzing or running, with the time reached; amber while paused, with the time; red if it failed; and how it ended once it is over, such as Simulation of work.tb ended at 115 ns (stopped) after 0.02 s. Then the waveform: its name, its number of signals and changes, and its end time; recording while it is still being written, or how long it took to load. On the right, the cursor's time, or with a second cursor both times, the time between them and its frequency.

The tabs

Everything in the window is a tab:

Tab What it shows
Hierarchy The design's scopes: the top level, its instances, generate blocks, and the packages folded away under Packages. Click a scope to list its signals.
Signals The signals of the selected scope, with their types, and a filter box. Double-click to add a signal to the waves.
Waves The wave view (The waveform viewer); the start page until something is open.
Terminal What a simulation prints, and the analyzer's messages (The terminal).
Project The open project's sources by library, and its wave setups (Projects).
A tab per file in the editor The code editor.
Problems and Search The editor's errors and warnings, and find in files.
Why this value?, Dataflow, Delta cycles The insight panels.

The default layout has the Hierarchy above the Signals on the left, the Waves in the middle and the Terminal below them. Tabs you open later go where they belong: the Project beside the Hierarchy, the editor's files beside the Waves, the Problems, Search and insight panels beside the Terminal.

Arranging the tabs

  • Drag a tab by its title to another group of tabs, or to the edge of one to split it there; drag the dividers between groups to resize them.
  • Close a tab with its ×. The Waves tab cannot be closed. The commands that show a tab bring it back where it belongs: Ctrl+B shows or hides the Hierarchy and Signals, Ctrl+J the Terminal, Ctrl+Shift+M the Problems, View → Show or hide the project the Project.
  • View → Reset the layout puts every tab back in the default layout.

Drag an editor tab beside the Waves to see code and waves side by side.

Tab windows

Any tab can have a window of its own, to put on another monitor:

  • Right-click its title and choose Move to a new window, or drag it out of the tabs and let go where no group or split is offered.
  • A window takes more tabs: right-click a tab in the main window and choose Move to the window of …. Inside a window, tabs are arranged and split as in the main one.
  • Right-click a tab in a window and choose Move back to the main window to bring it back, or close the window to bring all its tabs back, each to its place.
  • View → Bring every tab back into the main window gathers them all, which helps when a window was left on a monitor that is no longer connected.

The windows, their tabs and their places on the screen are kept with the layout between sessions, and with a project's layout when a project is open. Keys and dropped files work in every window.

Commands and keys

Every action of the window is a command. Search commands in the toolbar, Ctrl+Shift+P or F1 opens the command palette: type part of a command's name, choose with ↑ and ↓, and press Enter. Help → Keyboard shortcuts shows every key and mouse action in the window. Command reference lists them all.

Keys act where they make sense:

  • The wave view's keys (such as F, M, the arrows, Delete) act while no text field has the keyboard.
  • The editor's keys act while the editor has the keyboard, and then come before the same keys elsewhere: Ctrl+S saves the file being edited there, and the wave setup elsewhere; Ctrl+F finds in the file there, and filters the signals elsewhere.
  • The other keys act everywhere.

Themes

View → Theme, or the palette button at the right of the toolbar:

  • Follow system (the default): JanusHDL Dark or JanusHDL Light, as your operating system is set;
  • JanusHDL Dark, JanusHDL Light;
  • One Dark, Dracula, Nord and Solarized Light.

The theme colors the window, the waves and the code.

What the window remembers

Between sessions, the window keeps its theme, its size and place, the layout of the tabs (tab windows included), the recent projects, files and runs, the Run for time, and the editor's open files, text size, minimap and find options. They are kept in your user settings (Where JanusHDL keeps your settings). A project's layout and last view are kept with the project (Each user's state). The signals shown in the wave view are kept in wave setup files and with projects, not with the session.

Running simulations

The Run dialog

Simulate → Run simulation… (Ctrl+Shift+R, or the second toolbar button) opens the Run dialog:

Field What to enter
Project (.jhdlproj), file list (.f) or VHDL file A path; or press Browse…. Your recent runs are listed under it: one click fills them in.
Top entity library.entity. Empty: the project's top, or else the entity analyzed last.
Stop time When the run ends, such as 1 ms. Empty: the project's stop time, or else when nothing is left to do.

For a file list or a VHDL file, the dialog has three more fields (a project has its own, in Project settings):

Field What to enter
VHDL version 1993, 2002, 2008 (the default) or 2019, for every file of the run and the standard packages
Generics The top level's generics, one NAME=VALUE per line, the value as VHDL writes it (Generics): width=8, msg="hello", period=10 ns; uut.depth=16 sets the generic of an instance below the top
Compatibility mode Code the LRM forbids but whose meaning is clear is a warning, and runs as written (Compatibility mode)

Run starts it. A file list's files are analyzed in their libraries; a single VHDL file is analyzed into work.

What you choose is remembered for each file: choosing the file again (typed, browsed or from the recent runs) fills in its last top entity, stop time, VHDL version, generics and compatibility mode, and dropping the file on the window runs it with them. For per-library VHDL versions, rule levels, PSL in comments or other options, make a project: a project runs with all its settings (Projects).

Other ways to start a run:

  • drop a .f, .vhd or .vhdl file on the window: it runs straight away, with the settings remembered for it;
  • jhdlw --run FILE [--top LIB.ENTITY] [--stop-time TIME] on the command line, with the defaults for the rest, so that a command line runs the same for everyone;
  • with a project open, F5, Run for or Restart run the project.

Controlling the run

The simulation runs in the background; the window stays responsive. The toolbar and the Simulate menu control it:

Control Keys What it does
Run / Continue / Run again F5 Runs the last simulation; continues a paused one; after the end, runs it again from time 0
Pause F6 Pauses the run; the waves show everything up to the time it stands at
Run for F10 Runs on for the time in the toolbar's time box (10 us by default), then pauses
Restart Ctrl+Shift+F5 Back to time 0 with the same design, waiting there for Run or Run for; if a source file changed, it is analyzed and elaborated again first
Stop Shift+F5 Ends the simulation

The design stays loaded between runs: Restart and Run again do not analyze or elaborate again unless a source file changed. File → Reload waveform (Ctrl+R) on a simulation's waveform runs the simulation again.

The waveform opens while the simulation runs and grows as it goes, with the top level's signals shown (or, for a project, its wave setup or your last view). The view keeps showing the whole run as it grows, until you zoom or pan. Running the same design again, or restarting it, keeps your signal list, time scale and cursor.

The window records each run into a temporary file. To keep a recording, run the design with jhdl --wave (Recording waveforms), or with jhdl run for a project that names a waveform.

The terminal

The Terminal tab shows, as they happen:

  • text the design writes (writeline(OUTPUT, ...), which is how UVVM and OSVVM log);
  • reports and failed assertions, with time, delta cycle, source location and severity;
  • analysis and elaboration errors and warnings, as the command line prints them;
  • the simulator's own progress lines: Analyzing 23 files…, Analysis done in 410 ms, Elaborated work.tb in 12 ms, how the run ended.

Above the lines:

  • Five buttons show or hide lines by kind: errors and failures and warnings (each with its count), notes, output (text the design wrote) and simulator lines.
  • Filter: type to show only the lines that contain the text (case does not matter).
  • Clear empties the terminal (also Simulate → Clear terminal); the copy button copies the lines shown.

The terminal follows the newest line until you scroll up; scroll to the end to follow again. It keeps the last 200,000 lines.

A source location in a line, such as tb.vhd:13:5 (underlined), opens the file at that line in the code editor when you click the line. A location in a built-in library, such as ieee/numeric_std-body.vhdl:120, opens that library's source, read-only.

Ctrl+J shows or hides the terminal.