Skip to content

ByteField — Bit & Register Field Diagrams

ByteField renders hardware register layouts and bit-field maps as SVG diagrams. It accepts three input formats — pick whichever matches your workflow.


Format 1: Lisp-like DSL

The Clojure-inspired DSL is the most expressive format. Use draw-box for named fields, draw-gap for variable-length regions, and draw-column-headers to render the bit position header row.

Type-Length-Value (TLV) Register

16232431LengthValue07815TypeLength

IPv4 Header (first 64 bits)

263132474851Total LengthIdentificationPayload034781314151625VersionIHLDSCPECNTotal Length

Format 2: JSON Array

A structured JSON array where each object defines a field with name, bits, and optional type (used for color-coding by the renderer).

SPI Control Register

81011121314BAUD[2:0]DFFRXONLYSSMSSI0123457CPOLCPHALSBFSPEMSTRReserved

Format 3: YAML List

The most human-readable format — a YAML list of field definitions. Supports name, bits, attr (displayed annotations), and type for coloring.

Hardware Status Register

16192021232431BRKCPKClearRW0781415IPOBRKRORW