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

when statement is incorrectly synthesized #7

Closed
aswaterman opened this issue Aug 10, 2015 · 1 comment
Closed

when statement is incorrectly synthesized #7

aswaterman opened this issue Aug 10, 2015 · 1 comment
Labels

Comments

@aswaterman
Copy link
Member

Failing input: http://www.eecs.berkeley.edu/~waterman/whenBug.fir

The following code snippet

reg out_slow_bits : UInt<17>, clock, reset
out_slow_bits := tohost_q.deq.bits
when fromhost_q.deq.valid :
  out_slow_bits := fromhost_q.deq.bits

generates the following incorrect Verilog:

always @(posedge clock) begin
  out_slow_bits <= fromhost_q$deq$bits;
end

Of course, the correct code is

always @(posedge clock) begin
  out_slow_bits <= fromhost_q$deq$valid ? fromhost_q$deq$bits : tohost_q$deq$bits;
end
@aswaterman aswaterman added the bug label Aug 10, 2015
@aswaterman
Copy link
Member Author

Moving this to FIRRTL.

seldridge pushed a commit that referenced this issue Apr 6, 2022
* add mill build system
* bump to Chisel 3.5.0
* use cross build to select Scala version.
* add gitignore
* Add/use Compiler Plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant