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

review expression size and signedness #115

Open
jordens opened this issue Jun 10, 2018 · 1 comment
Open

review expression size and signedness #115

jordens opened this issue Jun 10, 2018 · 1 comment

Comments

@jordens
Copy link
Member

jordens commented Jun 10, 2018

  • verilog-2001, 4.4.2: self-determined expressions size: answer = (a + b) >> 1; //will not work properly and answer = (a + b + 0) >> 1; //will work correctly and table 29, Signal(4).eq((Signal(4, reset=0xf) + Signal(4, reset=0xf)) >> 1)
  • Mux() is probably unsigned if the first operand (the conditional, usually a comparison) is unsigned: Mux(1, Signal((3, True), reset=-1), Signal((2, True), reset=-1))
  • Cat([Signal((17, True)) for i in range(4)]).eq(Cat([Signal((17, True)) for i in range(4)])) drama and simulation/implementation mismatch (or vivado bug) of m-labs/artiq@0b08622
@whitequark
Copy link
Contributor

Triage: fixed in nMigen, which relies on Yosys to emit Verilog. The Yosys verilog backend is heavily tested using vloghammer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants