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

[topgen] ipgen template files (*.hjson.tpl) are used for clock and reset checks #25410

Open
Razer6 opened this issue Nov 27, 2024 · 0 comments
Open
Assignees
Labels
Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR

Comments

@Razer6
Copy link
Member

Razer6 commented Nov 27, 2024

The current topgen implementation uses the ipgen template files, the unrendered *.hjson.tpl files, for the initial clock and reset connection checks.

This approach is problematic because an ipgen'ed IP might want to enable or disable certain clk/reset signals in their configuration. Let's say you have an IP that has two different configurations:

  1. Config # 1 2 clocks
  2. Config # 2 1 clock

Let's say a top uses config # 2 with one clock. The top-level HJSON will then only specify 1 clock in their connection. However, during the initial clock checks, topgen will use the *.hjson.tpl file for the checks. There, 2 clocks for both configs are specified. The check then fails because the top has only connected 1 clock. Obviously, that is correct.

The code in question for that issue is in here:

https://github.com/lowRISC/opentitan/blob/4e65b642c74d3f89ead7e6717fc4231c5397bf77/util/topgen.py/L703-L745

@matutem I'ma assigning to you, since we chatted about that in Slack

@Razer6 Razer6 added the Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR
Projects
None yet
Development

No branches or pull requests

2 participants