Skip to content

v0.3: Finish the preprocessor, fill in various missing features

Compare
Choose a tag to compare
@MikePopoloski MikePopoloski released this 24 Mar 23:16
· 2883 commits to master since this release

Highlights

As of this release the preprocessor is 100% complete. This does not mean bug free (though I hope so!) but rather that all known features are finished, all known bugs are fixed, and there is 100% coverage in unit tests.

Language Support

  • Initial support for gate instantiations in the parser and AST
  • Tightened a bunch of parser rules for things like variable modifiers
  • Support parsing strength and delay modifiers in continuous assignments
  • Support creating implicit nets in all places allowed by the LRM
  • Full support for pragma directives in the preprocessor
  • $typename should now return the correct result for all types, as mandated by the LRM
  • Support for the type() operator in all places type references are allowed
  • Support for slicing packed and unpacked arrays across module array instantiations
  • Implement all rules related to variable lifetimes (static vs automatic)
  • Correctly prevent assignments to constants, nonblocking assignments to automatic variables
  • Support const'() casts
  • Support time literals, including all of the scaling and rounding rules

General Features

  • Lots of work was done on the documentation, CI builds, and the website. Check it out!
  • I removed most dependencies on 3rd party libraries that didn't do exactly what I wanted. This slims down the dependency tree and improved performance.
  • A bunch of improvements were made to the AST->JSON serialization (thanks @Kuree )
  • Printing of types in diagnostics was improved
  • Added a general system for correcting typos. For example:
module m;
    int someInt;
    int foo = someIn;
endmodule
source:3:15: error: use of undeclared identifier 'someIn'; did you mean 'someInt'?
    int foo = someIn;
              ^~~~~~
source:2:9: note: declared here
    int someInt;
        ^

Fixes

  • Lots of fixes to error recovery and error reporting in various cases
  • Struct members that required looking up type names was previously broken and has now been fixed
  • Fixed the check applied to enum initializers with unknown bits for 2-state base types
  • Port connections were previously not being type checked; that has been fixed
  • Fixed the result type of unary bitwise-not expressions