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

[Seq][FIRRTL] Add a seq.clock type to carry clocks for seq.firreg and seq.firmem #5851

Closed
nandor opened this issue Aug 15, 2023 · 1 comment
Assignees

Comments

@nandor
Copy link
Contributor

nandor commented Aug 15, 2023

Presently, in the firtool pipeline, clock information is thrown away when !firrtl.clock is lowered to i1. This is sub-optimal since past the lowering to HW, it is difficult to reason about the sanity of clocking in the design. For example, constant or invalid clocks require a data-flow analysis to find, instead of simply locating FIRRTL AsClock primitives. To address the shortcomings of hw, the firtool flow should preserve clock information up until the lowering of seq to sv.

seq should be equippend with a seq.clock type, to be used by the following ops:

  • seq.firreg
  • seq.firmem
  • seq.clock_gate

Additionally, seq.from_clock and seq.to_clock ops should cast between clocks and i1.

@nandor
Copy link
Contributor Author

nandor commented Sep 6, 2023

The newly opened PRs switch over ARC and firtool to use the clock type. Registers shared with other dialects allow the use of both i1 and seq.clock for clocking. This is a temporary measure until all dialects are switched over.

@nandor nandor closed this as completed Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant