Commit cf1372d5 authored by Adam Izraelevitz's avatar Adam Izraelevitz Committed by GitHub
Browse files

Bugfix inferwidth (#372)

* Bugfix: removed recursive removal in infer widths

This will certainly lead to more uninferred width errors, but now widths
that were previously incorrectly inferred are now correctly uninferred.

An example is:
  reg r : UInt, clock with: (reset => (reset, UInt<2>(3)))
  node x = add(r, r)
  r <= x

Here, r's width follows the following formula, which cannot be solved:

rWidth >= max(max(rWidth, rWidth) + 1, 2)

* Added optimizations to for better width inference

Also added exceptions for uninferred widths when checking DoPrim width
legality to not trigger compiler error

* Added additional optimizations

Required for passing all chisel3 tests
parents c19a53a5 fdde6f83
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment