[tlul regtool] multireg does not work for regs with more than 1 bit definition
The attached file shows an example where more than 1 bit is in a multireg register. The regtool processes this ok, but the linter fails in the elab step. Removing the bits, and leaving just one bit allows the compile to pass.
Is this a feature or a bug?
@eunchan
Looks like this is a bug. After multireg bitarray feature is implemented, it creates mreg structure incorrectly. for instance,
typedef struct packed {
struct packed {
logic q;
} ins_req;
struct packed {
logic q;
} app_seed_clr;
struct packed {
logic q;
} det_mode;
struct packed {
logic q;
} ins_req;
struct packed {
logic q;
} app_seed_clr;
struct packed {
logic q;
} det_mode;
struct packed {
logic q;
} ins_req;
struct packed {
logic q;
} app_seed_clr;
struct packed {
logic q;
} det_mode;
struct packed {
logic q;
} ins_req;
struct packed {
logic q;
} app_seed_clr;
struct packed {
logic q;
} det_mode;
} csrng_reg2hw_cs_app_ins_req_mreg_t;
The structure csrng_reg2hw_cs_app_ins_req_mreg_t has multiple internal structures that have same name ins_req.
@mwbranstad we did a quick hack, do you mind trying again with the latest? Hopefully it should work better now.
I updated git from the upstream master, and did not see an update to regtool.py. What is the process to try out this hack?
@tjaychen See prior comment.
@tjaychen @eunchan FYI - I have worked around this problem in my current hjson file. The attached file is all that I would run to verify any fix, so if that works for you, then i am guessing it is fixed. It is possible i may go back and rework part of the hjson file, but that would be after bronze.
The file that was updated is util/reggen/validate.py
So as long as you have the latest version, you should be able to just run the reg make and things will hopefully be okay.
On Fri, Apr 3, 2020, 07:56 mwbranstad [email protected] wrote:
@tjaychen https://github.com/tjaychen @eunchan https://github.com/eunchan FYI - I have worked around this problem in my current hjson file. The attached file is all that I would run to verify any fix, so if that works for you, then i am guessing it is fixed. It is possible i may go back and rework part of the hjson file, but that would be after bronze.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/1872#issuecomment-608488993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH2RSVB45C37SRVBI3LY5LRKX2LRANCNFSM4LZMFUTQ .
@mwbranstad does this work for you now? If yes, can you close this issue?
@msfschaffner I worked around this issue, so yes it works for me because of that. I was unable to run a pre-worked around version successfully, but then I run the regtool outside of the OT flow. We can either close this or assign to whom ever made the fix and confirmed it.
Based on new usage, not seeing this issue anymore.