rggen / rggen

Code generation tool for control and status registers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parameterized bit field with

taichi-ishitani opened this issue · comments

Currently, RgGen required bit field width should be static because ReGen checks if two bit fields are not overlapped. To do this check, the maximum width of a bit field has to be static.

Introduce max_width/min_width specifing range of width of a bit field to bit_assignment field.
Then bit field width can be parameterized.

bit_fields:
- { name: foo, bit_assignment: { lsb: 0, max_width: 8, min_width: 2 }, type: rw, initial_value: 0 }