SystemRDL / PeakRDL-Markdown

Markdown exporter for the PeakRDL toolchain
GNU General Public License v3.0
4 stars 7 forks source link

user template of output markdown file #6

Open saberxt opened 1 year ago

saberxt commented 1 year ago

In order to generate a markdown document with user defined format, we may need an option to pass a template to the exporter. Do you have any plan to deal with it?

MarekPikula commented 1 year ago

What kind of template are you thinking about? I.e., what structure would you expect from such a template. Originally, I used pages generated by this plugin in Sphinx documents as includes, so that wasn't a use case for me, but I can see that could be useful in some cases.

saberxt commented 1 year ago

demo register

AddressMap

Block Name Base Address Range
[demo_name](###0x0 demo_name) 0x0 0xa

0x0 demo_name

Reg Name Offset
[r1](####0x0 r1) 0x0
[r2](####0x1 r2) 0x1
[r3](####0x2 r3) 0x2
[r4](####0x3 r4) 0x3
[r5](####0x4 r5) 0x4
[r6](####0x5 r6) 0x5
[r7](####0x6 r7) 0x6
[r8](####0x7 r8) 0x7
[r9](####0x8 r9) 0x8
[r10](####0x9 r10) 0x9

return to top

0x0 r1

Bits Access Reset Name Description
7:0 rw 0xa f Storage

[return to module top](###0x0 demo_name)

0x1 r2

Bits Access Reset Name Description
7:0 rw 0x14 f None

[return to module top](###0x0 demo_name)

0x2 r3

Bits Access Reset Name Description
7:0 rw 0x1e f None

[return to module top](###0x0 demo_name)

0x3 r4

Bits Access Reset Name Description
7:0 rw 0x28 f None

[return to module top](###0x0 demo_name)

0x4 r5

Bits Access Reset Name Description
7:0 r 0x32 f None

[return to module top](###0x0 demo_name)

0x5 r6

Bits Access Reset Name Description
7:0 r 0x3c f None

[return to module top](###0x0 demo_name)

0x6 r7

Bits Access Reset Name Description
7:0 r 0x46 f None

[return to module top](###0x0 demo_name)

0x7 r8

Bits Access Reset Name Description
7:0 r 0x50 f None

[return to module top](###0x0 demo_name)

0x8 r9

Bits Access Reset Name Description
7:0 w 0x5a f None

[return to module top](###0x0 demo_name)

0x9 r10

Bits Access Reset Name Description
7:0 w 0x64 f None

[return to module top](###0x0 demo_name)

saberxt commented 1 year ago

something like above, I would like to add some link to this, or put my description of field in the table, etc.

I know this is not a mostly used structure of a register document, but maybe a way to add a template would improve the flexibility of markdown file.