Skip to content

Latest commit

 

History

History
55 lines (44 loc) · 2.41 KB

README.md

File metadata and controls

55 lines (44 loc) · 2.41 KB

Wavedrom ASCII

An ASCII (actually Unicode) representation of Wavedrom waves and bitfields.

Comparison

Example Wavedrom JSON:

{
  "signal": [
    {
      "name": "clk",
      "wave": "p......"
    },
    {
      "name": "bus",
      "wave": "x.34.5x",
      "data": "head body tail"
    },
    {
      "name": "wire",
      "wave": "0.1..0."
    }
  ]
}

Wavedrom image:

ASCII representation:

        ┌────┐    ┌────┐    ┌────┐    ┌────┐    ┌────┐    ┌────┐    ┌────┐    
  clk   ┘    └────┘    └────┘    └────┘    └────┘    └────┘    └────┘    └────
        ────────────────────╥─────────╥───────────────────╥─────────╥─────────
  bus   XXXXXXXXXXXXXXXXXXXX║ head    ║ body              ║ tail    ║XXXXXXXXX
        ────────────────────╨─────────╨───────────────────╨─────────╨─────────
                            ┌─────────────────────────────┐                   
  wire  ────────────────────┘                             └───────────────────

The Bitfield example from Wavedrom:

reg vl

Will be rendered as:

31  2928  262524      2019      1514  1211       7 6           0
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│ nf  │ mop │v│  lumop  │   rs1   │width│   vd    │0 0 0 0 1 1 1│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘