React Register Map

A datasheet-style register description in the manner of IP-XACT / CMSIS-SVD register views: a bit-numbered field diagram with reserved bits auto-filled and hatched, plus a field table with access-type badges (RW, RO, WO, W1C) and reset values. Hovering a field highlights it in both the diagram and the table — the interaction engineers expect from a register browser.

DMA_CTRLoffset 0x0004reset 0x0000_0100DMA channel control register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PRIO
BURST
BitsFieldAccessResetDescription
[31]BUSYRO0x0Transfer in progress
[24]ERRW1C0x0Bus error flag, write 1 to clear
[16]IRQ_ENRW0x0Raise interrupt on transfer complete
[9:8]PRIORW0x1Channel arbitration priority
[5:4]BURSTRW0x0Burst size: 1 / 4 / 8 / 16 beats
[1]DIRRW0x0Transfer direction: 0 = MEM→PER, 1 = PER→MEM
[0]ENRW0x0Channel enable

Hover a field in the diagram or the table — both highlight together.

Installation

npx shadcn@latest add register-map.json

Usage

Only the defined fields are declared — gaps become hatched RSVD segments automatically:

Loading...

Design notes

  • Reserved bits are explicit — unallocated ranges render as dashed, hatched segments, exactly as a datasheet marks them; they are excluded from the table.
  • Access types are badges — color-coded but always spelled out (RW, W1C …), so meaning survives grayscale printing.
  • MSB left — bit 31 down to 0, the universal register-diagram convention.
  • Cross-highlighting — diagram segment and table row share hover state, like an interactive SVD browser.

Props

RegisterMap

PropTypeDefaultDescription
namestringRegister name, e.g. "DMA_CTRL"
offsetstringByte offset shown in the header
widthnumber32Register width in bits
resetValuestringFull-register reset value
descriptionstringShort description in the header
fieldsRegisterField[]Declared fields (gaps become reserved)

RegisterField

PropTypeDefaultDescription
namestringField name
bits[number, number] \number
access'RW' \'RO' \'WO' \
resetstring0x0Field reset value
descriptionstringTable description column