Juniper/open-register-design-tool

param min_data_size seems to be interpreted as the default register size for SystemRDL

amykyta3 opened this issue · 2 comments

Interpretation of the global parameter "min_data_size" seems to have changed in the latest release (180502.01)

If left undefined, SystemRDL 1.0 defines that the default register width shall be 32-bits:

8.1.1 d) Field instances shall not occupy a bit position exceeding the MSB of the register. The default width of a register (regwidth) is 32 bits.

The min_data_size ORDT parameter seems to override this and coerce default register widths to that value. This did not seem to be the case in an earlier release (171103.01) so this may be a regression.

Testcase below:

<PARMS>
global {
  min_data_size = 8
}
</PARMS>

addrmap {
    reg {
        field {
            sw=r; hw=w;
        } F1[7:0];
        field {
            sw=r; hw=w;
        } F2[15:8];
    } MY_REG @ 0x0;
} MY_ADDRMAP;

Result in:

*** ERROR ***: Unable to fit all fields in 8b register instance MY_REG

Fix added in 180514.01. Will be picked up in next release.

Fix picked up in 181009.01 rls.