Skip to content

Commit f7ad566

Browse files
committed
[doc] Update section on DIFs in hw/design.md
Signed-off-by: Amaury Pouly <amaury.pouly@lowrisc.org>
1 parent a113255 commit f7ad566

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

doc/contributing/hw/design.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,12 @@ Generating both top and cmdgen can be done conveniently with
125125
$ make -C hw top_and_cmdgen
126126
```
127127

128-
### New DIF
128+
### Update DIFs
129129

130130
Unfortunately, re-generating TOP does not resolve everything.
131-
If the interrupt names are changed or new interrupts are introduced, the DIF for the IP block should be re-generated.
132-
133-
```console
134-
$ ./util/make_new_dif.py --mode=regen --only=autogen
135-
```
136-
137-
The command above updates the DIF (auto-generated part) under `sw/device/lib/dif/`.
138-
139-
If DIF for the IP block already uses the interrupt enums inside, you need to manually revise the reference.
140-
In most cases, the interrupt name is `kDif`, followed by the IP name in PascalCase (e.g `SpiDevice`), then `Irq`, then the interrupt name in PascalCase (e.g. `RxFull`).
141-
For example, `kDifSpiDeviceIrqRxFull`.
142-
To refer to an interrupt in the top-level PLIC enum, the format is `kTopEarlgreyPlicIrqId`, followed by the IP name in PascalCase, then the interrupt name in PascalCase.
143-
For example, `kTopEarlgreyPlicIrqIdSpiDeviceRxFull`.
131+
If the interrupt names are changed or new interrupts are introduced, the DIF for the IP block should be updated.
132+
The DIFs are split between an automatically generated part and a manually written one.
133+
The autogenerated code will automatically pick up changes but the manual part may need to be revised manually.
144134

145135
### PLIC Unittest
146136

0 commit comments

Comments
 (0)