cucapra / filament

Fearless hardware design
http://filamenthdl.com/
MIT License
139 stars 9 forks source link

Separate out type checking from interval check #111

Closed rachitnigam closed 1 year ago

rachitnigam commented 1 year ago

The interval check pass has gotten quite big and complicated because it is currently handling two different tasks:

  1. Standard well-formedness checks like indexes in bundles being within bounds
  2. Filament's interval checking algorithm

The reason for this is because of the original authors laziness and hesitation in adding another pass that calls into an SMT solver–because (1) also requires calls into an SMT solver, it was just easier to keep everything in one place. However, this has gotten extremely unwieldy. The correct solution is separating those two things out so we can write a standard type checking and well-formedness pass followed by an interval checker.

The nice thing about this issue is that it mostly involves code reorganization.

rachitnigam commented 1 year ago

This has been implemented in the new IR flow