Skip to content

Releases: MikePopoloski/slang

v0.4: Polish and refactoring

Choose a tag to compare

@MikePopoloski MikePopoloski released this 16 Aug 13:09

Highlights

This release contains a lot of internal refactoring and cleanup, with the goals of correctly handling all corner cases as well as dramatically speeding up compilation time -- some projects and workloads may see up to a 10x speedup.

Language Support

  • Support for intra-assignment timing controls
  • Full support for dynamic arrays in type checking and constant expressions
  • Full support for associative arrays in type checking and constant expressions
  • Partial support for queues in type checking and constant expressions (still missing expressions involving the '$' magic value)
  • Added $dimensions and $unpacked_dimensions system functions
  • Added $printtimescale, $timeformat, and $system functions
  • Added $ferror, $fgets, $fscanf, $sscanf, and $fread system functions
  • Support for disable statements
  • Support for unpacked array concatenations
  • Support for min:typ:max expressions
  • Support for disable-fork and wait-fork statements
  • String literals can now correctly be implicitly assigned to unpacked arrays of bytes (thanks to @thingkingland )

General Features

  • Reworked how definitions and instances are represented, both to make the code clearer as well as to allow caching of identical instances.
  • Timing controls are now included in AST->JSON serialization (thanks to @Kuree ).
  • Added initial support for generating simulation code for designs using LLVM. There's enough support here to simulate a basic "Hello World" example but not much else.
  • To facilitate code generation, a mid-level IR representation was added to sit between the AST and LLVM. In the future this could grow to be useful to other consumers as well.
  • Went through and removed experimental code analysis services from the repository and ported the CI build to GitHub actions, fixing the automated release and deployment pipeline in the process.
  • Split slang into several component libraries to make it easier to link in only subsets of functionality.
  • Added a bunch more API reference documentation.
  • The remaining 3rd party dependencies have been vendored into the repo under the external/ folder. The conan package manager has been removed from the build process.

Fixes

  • Fixed a bug where stringifying certain integer literals could produce garbage results.
  • Improved parser error recovery in more scenarios.
  • Fixed several crashes found by fuzz testing.
  • Empty concatenations now correctly report an error.
  • Fixed a faulty error reported when range-selecting a single bit from a big-endian vector.
  • Fixed the type that is inferred for implicitly typed parameters.
  • Rewrote lvalue handling in constant expressions to fix several corner cases.
  • Fixed a crash in the preprocessor involving a rare case of macro replacing a token that then becomes another macro.
  • Fixed parsing of cycle delays.
  • Fixed ANSI color output on Windows terminals.
  • Fixed variable lifetimes of task arguments.
  • Packed dimensions on enum declarations were previously being ignored.
  • Added additional error checking for various array creation rules.
  • Fixed an infinite loop in the parser caused by unsupported statements (thanks to @thingkingland ).
  • Fixed a bunch of issues with parsing new expressions.
  • Fixed a bunch of issues with parsing clocking blocks.
  • The error reported for non-standard character escape codes has been downgraded to a warning.

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

Choose a tag to compare

@MikePopoloski MikePopoloski released this 24 Mar 23:16

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

v0.2: More elaboration features and bugfixes

Choose a tag to compare

@MikePopoloski MikePopoloski released this 20 Jan 23:24

This release fills in a bunch of missing holes and corner cases and cleans up a bunch of bugs. The first beginnings of a more structured release process and documentation system are in place.

This is the first release as of which feature support is tracked in the documentation.

v0.1: First useful release

Choose a tag to compare

@MikePopoloski MikePopoloski released this 03 Dec 01:52

This is the first release of slang that is somewhat useful. The library supports lexing, preprocessing, parsing, type checking, and elaboration for a good portion of the language. The slang tool can be run on medium to large codebases and print out useful diagnostics.

There's still plenty of work to do but it seemed like a good idea to take a checkpoint.