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

Added support for successive <> operations overriding each other. #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albert-magyar
Copy link
Contributor

I implemented and tested out both varieties of overriding bulk connects, letting := override <> and letting <> override <>, and I think a good case can be made for the latter.

If :=/procAssign were special-cased to override <>/assign only when no when condition exists, this special overriding assignment would necessarily not be able to be overridden again by a conditional :=, making its meaning more similar to assign than procAssign.

The second way has the tradeoff of requiring multiple calls to assign to succeed, but allowing overriding essentially implies that this is okay. It enforces a few rules:

  1. <> can override <> at any part of the hierarchy
  2. <> cannot be conditional
  3. := cannot override <>

Rule 2 should be enforced even with the existing Chisel semantics, but this case currently produces incorrect results silently. This change also adds a check for this.

@sdtwigg
Copy link
Contributor

sdtwigg commented Apr 17, 2014

Why does <> use a different underlying mechanism for assignment than :=? Perhaps we could extend this commit to cover 2 and 3 as well. It seems like <> should just decompose into a bunch of := operations. I'm not sure what the point is having two assign primitives where one is strictly less-featured than the other.

@aswaterman
Copy link
Member

It is not the case that one is less-featured than the other. <> is
direction-agnostic, while := is not. := supports conditional updates,
while <> does not.

On Wed, Apr 16, 2014 at 6:15 PM, Stephen Twigg [email protected]:

Why does <> use a different underlying mechanism for assignment than :=?
It seems like <> should just decompose into a bunch of := operations. I'm
not sure what the point is having two assign primitives where one is
strictly less-featured than the other.


Reply to this email directly or view it on GitHubhttps://github.com//pull/190#issuecomment-40671065
.

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

Successfully merging this pull request may close these issues.

3 participants