Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[otp_ctrl] Make usable in different top-level designs (multi-top support) #25019

Closed
andreaskurth opened this issue Nov 5, 2024 · 1 comment · Fixed by #25503
Closed

[otp_ctrl] Make usable in different top-level designs (multi-top support) #25019

andreaskurth opened this issue Nov 5, 2024 · 1 comment · Fixed by #25503

Comments

@andreaskurth
Copy link
Contributor

otp_ctrl is currently specific to Earlgrey on master and to Darjeeling on integrated_dev. Substantial differences between the two can be found in otp_ctrl_reg_top and otp_ctrl_part_pkg, though other RTL code also contains differences.

As a scalable, long-term solution, should otp_ctrl be generated through ipgen and topgen?

As a workable, near-term solution, would a second variant with a different name (e.g., otp_ctrl_darjeeling) be necessary and sufficient?

@matutem
Copy link
Contributor

matutem commented Nov 6, 2024

Here is what I dug up so far about otp_ctrl. Between Aug and Sep 2023 Michael and I made a bunch of changes in opentitan-integrated to generate a bunch of otp_ctrl files based on hw/ip/otp_ctrl/data/otp_ctrl_mmap.hjson. This uses util/design/gen-otp-mmap.py, which is not a great name since it uses the hjson mmap file to generate other stuff.

Some PRs:

Then in Jan 2024 I made these (hopefully same) changes in master.

This not the typical generation flow: the typical ipgen flow starts from the top_level hjson, but in this case the "source of truth" is the /data/_mmap.hjson, and .hjson is generated. However, in theory topgen can use any file (or files) to extract the parameters used to generate its artifacts. In fact, I think we can use ipgen for this.

matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
This is part of moving the otp image collateral out of hw/ip/otp_ctrl
in preparation for multi-top.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
Most of the OTP image generation tools are top-specific so they are
moved to hw/top_earlgrey/data/otp. The few things that are generic
move to util/design/data.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
This is part of moving the otp image collateral out of hw/ip/otp_ctrl
in preparation for multi-top.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
Most of the OTP image generation tools are top-specific so they are
moved to hw/top_earlgrey/data/otp. The few things that are generic
move to util/design/data.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
Most of the OTP image generation tools are top-specific so they are
moved to hw/top_earlgrey/data/otp. The few things that are generic
move to util/design/data.

Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.

Adjust some paths to README.md files.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
Most of the OTP image generation tools are top-specific so they are
moved to hw/top_earlgrey/data/otp. The few things that are generic
move to util/design/data.

Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.

Adjust some paths to README.md files.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
Most of the OTP image generation tools are top-specific so they are
moved to hw/top_earlgrey/data/otp. The few things that are generic
move to util/design/data.

Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.

Adjust some paths to README.md files.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Adjust paths to targets that moved.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Adjust paths to targets that moved.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Adjust paths to targets that moved.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Adjust paths to targets that moved.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 4, 2024
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Adjust paths to targets that moved.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
This is a straight copy with no changes to the files.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
There is no use for files in ip_templates that will end up being
generated.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
This is because this is a top-specific data that is NOT generated.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
The template files are almost identical to the previous ones, except
- they use ${topname} instead of a specific name
- consecutive '#' are escaped so they are not considered hugo comments;
  for example, ### is replaced by ${"###"}
- text bracketed by CMDGEN is removed

Adjust some relative paths to account for the change in the file locations.

Use {self_dir} to simplify some paths: it points to the location of the hjson
file used to process the contents of a given file.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Dec 5, 2024
The template core files use instance_vlnv, and declare a virtual target.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
…jeeling

This is similar to the new placement of the corresponding earlgrey files.
Fix the copyright banner.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
These artifacts need to be placed under top-specific directories.
When the sw side is ready for that, change the flow to create the
per top generated files in the right place.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
As a side effect some random constants are changed, since there
are more requests for random numbers in topgen.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
This tool may become obsolete, but it is best to upgrade it per
the ipgen flow.
Comment out dif generation, and add a TODO with an explicit issue.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
This avoids the confusion about which top to refer to.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Use ip_autogen path for otp_ctrl_c_regs.
Use ip_autogen path for rust artifacts.
Change a few hw BUILD files for ipgen changes.
Fix reference to data/otp_ctrl.hjson in BUILD.tpl.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Describe references to top-specific otp_ctrl as examples.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
but keep otp_ctrl_pkg since it shows in types of unconnected ports.

Part of lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 5, 2025
matutem added a commit to matutem/opentitan that referenced this issue Jan 8, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 10, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 10, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 10, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 10, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 10, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
a-will pushed a commit to matutem/opentitan that referenced this issue Jan 13, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 13, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 13, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Jan 13, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes lowRISC#25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes lowRISC#25019

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit that referenced this issue Jan 13, 2025
This commit is similar to other ipgen conversions, but changes a few
extra things because it needs to change the generation of otp memory
images. It merges the following 32 individual commits:

- Fix OtpMemMap exception message
- Improve handling template parameters by ipgen
  - Add doc and avoid redundant declaration.
- Move otp_ctrl images and mmap hjson out of hw/ip
  - The files that are top-specific moved to hw/top_earlgrey/data/otp
  - Adjust lots of paths to match this change
  - Move otp_ctrl_img.c.tpl to util/design/data since it is generic
  - Move the documentation of otp image generation to util/design/README.md
- Add otp_ctrl ipgen tpldesc hjson file
- Copy all hw/ip/otp_ctrl files to ip_templates
  - This is a straight copy with no changes to the files.
- Remove generated files
  - There is no use for files in ip_templates that will end up being
    generated.
- Move template files to their specific directories
- Turn a few more files into templates and fix paths
  - The template files are almost identical to the previous ones, except
    - they use ${topname} instead of a specific name
    - consecutive '#' are escaped so they are not considered hugo comments;
      for example, ### is replaced by ${"###"}
    - text bracketed by CMDGEN is removed
  - Adjust some relative paths to account for the change in the file locations.
  - Use {self_dir} to simplify some paths: it points to the location of the hjson
    file used to process the contents of a given file.
  - Fix some incorrect links to docs.
- Move top-specific items out of otp_ctrl_pkg
  - Move top-specific and implementation items to otp_ctrl_top_specific_pkg.
  - Create separate core files for both packages.
  - Adjust multiple sv files to use the right package.
  - Remove unused lc_otp_token_{req,rsp}_t.
- Fix core files
  - Change most core file into templates, use instance_vlnv, and declare
    a virtual target.
  - Change otp_ctrl_sim_cfg.hjson into a template since it uses a template
    fusesoc core.
- Change templates to use plain dictionaries
  - In practice this just removes redundant config token.
- Block building template targets
  - Add otp_ctrl in hw/ip_templates/BUILD all_files.
  - Template files are only intended for code generation, so it makes
    no sense to use them to build targets.
- Remove gen_comment from templates
  - The comment regarding generation for ipgen artifacts will be dealt
    with uniformly in the PR that fixes #25444.
  - Remove gen_comment from the tpldesc file.
- Add code in OtpMemMap to support ipgen
  - Create packages for design.lib and design.mubi.
  - gen-flash-img depends on modules that import topgen modules so it
    needs to have topgen in sys.path. This was not needed for some reason,
    perhaps the introduction of packages ends up requiring it.
- Place darjeeling mmap and img files under hw/top_darjeeling
  - This is similar to the new placement of the corresponding earlgrey files.
  - Fix the copyright banner.
- Block generation of dif artifacts
  - These artifacts need to be placed under top-specific directories.
  - When the sw side is ready for that, change the flow to create the
    per top generated files in the right place.
- Create otp_ctrl with ipgen
  - Create both earlgrey and darjeeling otp_ctrl with topgen.py via ipgen.
  - As a side effect some random constants are changed, since there
    are more requests for random numbers in topgen.
- Make util/design/gen-otp-mmap.py compatible with otp_ctrl ipgen
  - This tool may become obsolete, but it is best to upgrade it per
    the ipgen flow.
  - Comment out dif generation, and add a TODO with an explicit issue.
- Add mmap_def argument in bazel's otp_image_consts
- Remove unnecessary otp link in md file
  - This avoids the confusion about which top to refer to.
- Generate otp_ctrl difs via ipgen
- Fix top level core files
- Fix BUILD files
  - Use ip_autogen path for otp_ctrl_c_regs.
  - Use ip_autogen path for rust artifacts.
  - Change a few hw BUILD files for ipgen changes.
  - Fix reference to data/otp_ctrl.hjson in BUILD.tpl.
- Fix image handling in dvsim sim.mk
- Fix hjson files
- Fix md files
  - Describe references to top-specific otp_ctrl as examples.
- Fix BLOCKFILE
- Fix documentation collateral
- Fix englishbreakfast build
  - Remove otp_ctrl from top_englishbreakfast because it is not instantiated,
    but keep otp_ctrl_pkg since it shows in types of unconnected ports.
- Remove obsolete otp-mmap check from ci
- Remove legacy files
- Update hw/ip/README.md file

Fixes #25019

Signed-off-by: Guillermo Maturana <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants