diff --git a/src/docs/verilog-waveform.md b/src/docs/verilog-waveform.md new file mode 100644 index 00000000..7311fa8f --- /dev/null +++ b/src/docs/verilog-waveform.md @@ -0,0 +1,29 @@ +# Waveform Viewer + +The Verilog platform shows a waveform trace below the emulator screen, +with one row per exposed signal. **Click** to give the waveform viewer +keyboard focus. + +If the CRT is active, the waveform viewer is hidden by default, below the CRT frame. +You can **click and drag** its frame border up from the bottom of the screen. + +## Which signals appear + +The trace shows every scalar/vector `logic` signal from the flattened +design: top-level ports and internal registers and wires from every +submodule, not just the top level. These are omitted: + +- Non-logic types (arrays, memories) +- Internal simulator temporaries (names starting with `__V`) +- If the design drives video output (it has `vsync`, `hsync`, and `rgb` + signals), `clk` and `reset` + +Multi-bit signals will display their hex or decimal values on top of the waveforms when zoomed in. + +## Mouse actions + +- **Click** on the trace to move the selection cursor to that clock. +- **Click and drag** to scrub through the trace. +- **Scroll horizontally** to pan left/right. +- For input signals (other than `clk` or `reset`) **click** its row to change its + value at the current clock. diff --git a/src/ide/ui.ts b/src/ide/ui.ts index 895533b8..2eb9ee49 100644 --- a/src/ide/ui.ts +++ b/src/ide/ui.ts @@ -30,7 +30,7 @@ import { AssetEditorView } from "./views/asseteditor"; import { isMobileDevice } from "./views/baseviews"; import { AddressHeatMapView, BinaryFileView, BreakpointsView, MemoryMapView, MemoryView, ProbeLogView, ProbeSymbolView, RasterStackMapView, ScanlineIOView, VRAMMemoryView } from "./views/debugviews"; import { DisassemblerView, HeaderView, ListingView, PC_LINE_LOOKAHEAD, SourceEditor, setUppercaseOnly } from "./views/editors"; -import { HELP_TOPICS, HelpView, helpTopicForView } from "./views/helpview"; +import { HELP_TOPICS, HelpView, elementHelpTopicForFocus, helpTopicForView } from "./views/helpview"; import { CallStackView, DebugBrowserView } from "./views/treeviews"; import { ProjectWindows } from "./windows"; import { setupSplits, showTab } from "./layout"; @@ -1861,8 +1861,11 @@ function setupDebugControls() { // Going through the hash means Back returns to the previous view. function showContextHelp() { if (!projectWindows) return; + // widgets embedded outside ProjectWindows (e.g. the Verilog waveform + // viewer) register their own topic; prefer that when it has focus + var elId = elementHelpTopicForFocus(); var isEditor = projectWindows.getActive() instanceof SourceEditor; - var id = helpTopicForView(projectWindows.getActiveID(), isEditor); + var id = elId || helpTopicForView(projectWindows.getActiveID(), isEditor); var hash = '#help/' + id; if (window.location.hash === hash) { projectWindows.createOrShow(hash); diff --git a/src/ide/views/debugviews.ts b/src/ide/views/debugviews.ts index a68dbb50..91a6f61b 100644 --- a/src/ide/views/debugviews.ts +++ b/src/ide/views/debugviews.ts @@ -985,7 +985,7 @@ export class BreakpointsView implements ProjectView { .attr('placeholder', 'address or symbol (e.g. $8000, mainloop)') .val(editing && editing.bp.type == 'address' ? editing.bp.target : ''); const condInput = $('') - .attr('placeholder', 'condition (e.g. A == $20, #scanline > 222)') + .attr('placeholder', 'condition (e.g. A>=$20, #scanline==222)') .val(editing ? editing.bp.condition || '' : ''); const submit = $('