opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[tracking] Use ipgen to produce templated IPs

Open imphil opened this issue 4 years ago • 9 comments

The following IP blocks are actually templates at the moment and need to be converted to be using ipgen (slides discussing motivation and general approach).

  • [x] alert_handler: https://github.com/lowRISC/opentitan/pull/8513
  • [ ] clkmgr
    • [x] Create ipgen files: https://github.com/lowRISC/opentitan/pull/21202
    • [ ] Transition to ipgen files and remove old files
  • [ ] flash_ctrl
    • [x] Create ipgen files: https://github.com/lowRISC/opentitan/pull/21170
    • [ ] Transition to ipgen files and remove old files
  • [x] pwrmgr: https://github.com/lowRISC/opentitan/pull/19801
  • [x] rstmgr: https://github.com/lowRISC/opentitan/pull/21041
  • [x] rv_plic: #8431

Blocks which need a closer look:

  • [ ] ast ~~- [ ] padctrl~~
  • [ ] pinmux
  • [ ] otp_ctrl
  • [x] sensor_ctrl (not templated)
  • [ ] xbar
  • [ ] xbar_main
  • [ ] xbar_peri

imphil avatar Sep 29 '21 22:09 imphil

CC @alphan

msfschaffner avatar Nov 18 '22 20:11 msfschaffner

Triaging for flash_ctrl. This is a significant chunk of work and not required for M2.5, however it is likely useful for integrated.

GregAC avatar Feb 22 '23 15:02 GregAC

Triaged for pwrmgr - agree

andreaskurth avatar Feb 22 '23 16:02 andreaskurth

Triaged for 'rstmgr'

GregAC avatar Feb 23 '23 11:02 GregAC

Triaged for pinmux - Same conclusion as above

GregAC avatar Feb 24 '23 11:02 GregAC

Triaged for sensor_ctrl - Same conclusion as above

GregAC avatar Feb 24 '23 13:02 GregAC

Should templated DIFs also accompany templated IPs? Or do we feel that the current mechanisms with C preprocessor macros are enough?

The alert_handler DIFs notably have static_assert() on the exact values of template parameters.

a-will avatar Jul 17 '23 15:07 a-will

That is a very good question. I have the feeling that some level of customization could be useful and convenient. See also this related discussion regarding documentation: https://github.com/lowRISC/opentitan/pull/19149#discussion_r1266874045

msfschaffner avatar Jul 19 '23 13:07 msfschaffner

Regarding difs, we had to develop templated difs for otp_ctrl.

I have also seen is asked what are the specific points of customization for some top-specific IPs. This is handled in topgen, but it is not black magic, meaning it could be extracted and documented.

matutem avatar Sep 27 '23 17:09 matutem

Changing the milestone past M4.

matutem avatar May 16 '24 21:05 matutem

M5 is okay if there are zero Earlgrey RTL changes coming from the open items (which should be the case anyway when the templating is done correctly, right?)

andreaskurth avatar May 17 '24 14:05 andreaskurth

As just discussed with @matutem and @vogelpi, we are moving this to the Multi-Top milestone because it's not strictly needed for Earlgrey-PROD.

andreaskurth avatar Jul 16 '24 18:07 andreaskurth