This package provides a major mode for editing and rendering WaveJSON files to create timing diagrams using wavedrom.
-
wavedrom-cli
: https://github.com/wavedrom/cli -
Optional:
inkscape
to export to PDF
wavedrom
is available on MELPA.
To install it via straight with use-package
:
(straight-use-package 'use-package)
(use-package wavedrom)
The package comes with sensible default values. However, you can
tweak it either with M-x customize-group RET wavedrom RET
or with
the following Elisp code:
(setq wavedrom-output-format "pdf")
(setq wavedrom-output-directory "~/wavedrom")
;; Faces suitable for dark themes
(set-face-attribute 'wavedrom-font-lock-brackets-face nil :foreground "goldenrod")
(set-face-attribute 'wavedrom-font-lock-punctuation-face nil :foreground "burlywood")
-
Create a file with
.wjson
extension andwavedrom-mode
will automatically be enabled next time it is opened. -
Fill the file with valid WaveJSON syntax and every time it is saved the function
wavedrom-compile
will be executed, updating the output file and its associated buffer. This provides a WYSIWYG-like result similar to the one with the web editor. -
The output file path will be determined from the value of customizable variables
wavedrom-output-format
andwavedrom-output-directory
. For example, if editing the filehello_world.wjson
:(setq wavedrom-output-format "svg") (setq wavedrom-output-directory "~/wavedrom")
The rendered file will be created at:
~/wavedrom/hello_world.svg
- C-c C-c:
wavedrom-compile
- C-c C-p:
wavedrom-preview-browser
- verilog-ts-mode: SystemVerilog Tree-sitter mode
- vhdl-ts-mode: VHDL Tree-sitter mode
- verilog-ext: SystemVerilog Extensions
- vhdl-ext: VHDL Extensions
- fpga: FPGA & ASIC Utilities for tools of major vendors and open source
- vunit-mode: Integration of VUnit workflow