lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.51k stars 745 forks source link

[reggen] Add support for compact regwen_multi type #8185

Open tjaychen opened 3 years ago

tjaychen commented 3 years ago

Right now, if a multireg needs to use regwen, it takes one of two forms.

  1. All multi registers are locked with the same regwen
  2. Each multi register is locked with a separate regwen. In this case, both the reg and regwen have to be non-compact multi-regs.

While 2 works fine, it creates more burden on the software to have to manage multiple sets of registers. Add an option to support compact multireg regwen in the future.

To do this, when creating multiregs, we need to have some idea of attributes of the regwen (whether its compact or not). It may be better then to have reg_block.py do a 2 pass loop over registers. First to identify all the regwens and figure out their attributes, and the second pass as it is today. This will then give all the registers some structure to directly fetch regwen attributes.

We can't do this today because by the time the multireg class starts creating registers, we are already way beyond the point of getting any information on the regwen attributes. In fact, we do not validate regwen attributes until after all registers are created.

This is probably a longer term goal since it also has a sizeable impact on DV

tjaychen commented 3 years ago

@rswarbrick @eunchan @msfschaffner @cindychip @weicaiyang

please let me know what you guys think. This is directly related to #8154

rswarbrick commented 3 years ago

Sounds like a reasonable design, and not all that difficult. I assume the idea is that the regwen multiregister would then have 1 bit per register that it was enabling? And we'd still require the register that was being enabled to be non-compact?

tjaychen commented 3 years ago

so that's kind of the part where this is getting annoying. When I went through this with software some time ago, they wanted to have the regwen and the register modulated by regwen all compact. (you can kind of see this in the rstmgr dif design).

So that's where this is getting annoying. Because that means by the time we do all the regwen processing, we need to look back for what the original regwen attributes are and then adjust accordingly.

On Wed, Sep 15, 2021 at 4:56 AM Rupert Swarbrick @.***> wrote:

Sounds like a reasonable design, and not all that difficult. I assume the idea is that the regwen multiregister would then have 1 bit per register that it was enabling? And we'd still require the register that was being enabled to be non-compact?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/8185#issuecomment-919952766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH2RSRBAQ4PJOF6PK6PN4TUCCCVBANCNFSM5EA33TOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

GregAC commented 1 year ago

Triaged for rstmgr, may be useful for Integrated but not required for M2.5

msfschaffner commented 10 months ago

@rswarbrick @GregAC what is your view on this? I am not sure this is high priority for PROD...

msfschaffner commented 9 months ago

I removed this from the PROD milestones, since I don't think it will be relevant.