question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Clarification on Guarantees for High/Mid/Low FIRRTL

See original GitHub issue

I had an odd realization in that FIRRTL levels below High do not respect last connect semantics. The ExpandWhens transform is expected to clean this up for you.

A result of this is that transforms that add new statements (that are not “in place” modifications of existing statements) should either take place at the High FIRRTL level or emit High FIRRTL so that the circuit will be cleaned up for you.

Are there any existing clarifications of what guarantees are expected for specific transforms at specific FIRRTL levels?

  • Technically these guarantees can be gleaned by reading the LoweringCompilers code…

What I’ve discovered:

  • circuits <= Mid FIRRTL do not obey last connect semantics (cleand up by ExpandWhens)
  • circuits == Mid FIRRTL provide no guarantees that signal names will not alias to each other (cleaned up by Uniquify), e.g., adding the signal wire r_x: UInt<5> to a module with existing signal wire r : {x: UInt<5>} will result in a hidden name conflict

These may be bugs or they may be a violation of the [High, Mid, Low] FIRRTL contract.

Alternatively, this may motivate a new CheckMidForm pass (to save me from myself…).

Edit: After digging a bit more, this is some documentation of this in the code: Compilers.scala. I think that the restrictions are stricter, nonetheless.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jackkoenigcommented, Oct 2, 2017

Oh cool, thanks @edwardcwang, I didn’t realize we were publishing the ScalaDoc

0reactions
seldridgecommented, Dec 17, 2018

The guarantees for this are explained in the comments. The Dependency API refactor will make it explicit what is required and what is invalidated. See: #948.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[question] Clarification on Guarantees for High/Mid/Low FIRRTL
I had an odd realization in that FIRRTL levels below High do not respect last connect semantics. The ExpandWhens transform is expected to ......
Read more >
Frequently Asked Questions - Chisel/FIRRTL
Chisel currently provides the following: DecoupledIO - No guarantees; IrrevocableIO - Producer promises to not change the value of 'bits' after a cycle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found