rdlfmt#
A formatter for SystemRDL 2.0, following the PeakRDL style guide.
Before:
addrmap top{
reg {
field{sw=rw;
hw=r;} data[31:0]; // payload
}ctrl @0x0;
reg{field{sw=r;hw=w;}status[7:0];}stat@0x4;
};
After:
addrmap top {
reg {
field {
sw = rw;
hw = r;
} data[31:0]; // payload
} ctrl @ 0x0;
reg {
field {
sw = r; hw = w;
} status[7:0];
} stat @ 0x4;
};
There is nothing to configure, deliberately. A formatter earns its value by ending arguments, not by relocating them into a config file.
Quick start#
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/fischeti/rdlfmt/releases/latest/download/rdlfmt-installer.sh | sh
rdlfmt regs.rdl
See Installation for the other ways to get it, Usage for the rest of the command line, and Editor integration for format-on-save.