Skip to content

v0.2.4

Choose a tag to compare

@rafa-rrayes rafa-rrayes released this 05 Mar 18:06
· 34 commits to master since this release

What's Changed

Better error messages for invalid port references

Invalid port references (e.g. add.Carry31 where Carry31 doesn't exist on Adder32) now produce clear, actionable errors:

error[E0304]: Unknown port 'Carry31' on component 'Adder32'
  --> addSub32.shdl:10:9
      |
 10 |         add.Carry31 -> S[1];
      |         ^
   = note: available ports: A, B, Cin, S, Cout

Previously this would produce the confusing message "Unknown instance 'add'".

Changes

  • Integrated the existing semantic analyzer into the flattener pipeline — it now runs automatically before flattening
  • Added defensive guards in the flattener's rewire functions to catch unmapped ports
  • Flattener accepts a validate parameter (default True) to control semantic validation