Commit Graph

43 Commits

Author SHA1 Message Date
Zachary Snow 150b7f2af1 enum item conflict raises scoped error 2021-10-10 22:04:51 -06:00
Zachary Snow d1d81eb8d6 use scoped errors in interface conversion 2021-10-07 21:06:45 -06:00
Zachary Snow 84edbae503 preliminary scoped errors with approximate source location
- scoped traversals can now raise errors which contain the path of the
  current scope and an approximate source location based on preceding
  trace comments, if available
- initially, this new error messaging has only been added for the
  illegal size cast checks in the TypeOf and Cast conversions
- error suite tests can provide a verbose mode expected source location
2021-10-06 22:17:41 -06:00
Zachary Snow f061e88214 cleanup error suite infrastructure
- error suite runs in both regular and verbose mode
- add helper for extracting "flags" from test files
- common assertMatch, assertNotMatch helpers
- remove unused assertExists helper
- fix un-escaped wildcard in assert_deferred_nonzero.sv
2021-10-05 14:25:10 -06:00
Zachary Snow ff241115c4 forbid bit-selects and part-selects of scalar struct fields 2021-09-27 21:52:37 -06:00
Zachary Snow 95c2bc996c support for common non-ANSI style port declarations
Specifically, support has been added for non-ANSI style port
declarations where the port declaration is separate from the
corresponding net or variable declaration.
2021-09-06 21:10:49 -04:00
Zachary Snow da2d4117f2 specialized parsing for parameter port lists
This adds support for typed valued parameters declared in parameter port
lists without explicitly providing a leading `parameter` or `localparam`
marker.
2021-08-20 18:08:14 -06:00
Zachary Snow c17d859988 tolerate escaped vendor comments within macros 2021-08-16 18:22:04 -06:00
Zachary Snow 581a7911de support for deferred immediate assertion statements 2021-08-16 17:50:23 -06:00
Zachary Snow 59d37468a4 fix internal interpretation of negative number literals
- detect and forbid non-positive size casts
- detect and forbid negative struct pattern literal indices
- avoid invalid constant folding of negative based literals
2021-08-07 21:11:35 -06:00
Zachary Snow 1311e449fe fix errant expr resolution flagging
- references to other instances are no longer flagged
- special handling for genvars to avoid flagging and modport scoping
- interface inlining visits expressions in declarations
- Scoper has interface for removing entries
2021-07-23 19:59:26 -04:00
Zachary Snow 3eefd03c8d additional declaration parsing errors
- general refactoring in decl parsing
- restrict charge strength to trireg
- require const vars to be initialized
- forbid const net declarations
- disallow run-on declarations in packages and classes
2021-07-09 15:41:17 -04:00
Zachary Snow 789afd1bb2 error on size cast with non-integer size 2021-07-09 10:25:18 -04:00
Zachary Snow 6381c3e050 minor type cleanup and fixes
- remove outdated flexible partial type eq and show instances
- properly disallow incomplete declarations
- disallow var after net type
- remove unused edge case in InterfaceT representation
2021-07-06 12:12:59 -04:00
Zachary Snow 5fd21ebfb0 improved parsing in declaration contexts
- support for additional assignment statements in loop initializations
- greatly improved error messaging in these contexts
- decl parser takes in the ending token; significant related refactoring
- pass through elaboration system tasks
- removed non-blocking assignment operator precedence hack
- preliminary nosim test suite for features unsupported by iverilog
2021-07-05 18:00:12 -04:00
Zachary Snow 6ee558b6b9 initial pass improving decl parsing error messages
- all decl tokens are given an accurate starting position
- key grammar productions return token positions to facilitate the above
- helpers for standardized parse error generation
- replaced annoying pattern-matching type argument restrictions
- moving away from dumping raw decl tokens in error messages
2021-07-03 13:23:33 -04:00
Zachary Snow dbbf71c65a revised struct pattern representation
- pattern keys now represented as TypeOrExpr
- support for simple integer struct pattern keys
2021-06-20 15:32:12 -04:00
Zachary Snow c0cb401abe fix handling of end labels
- disallow using end label alone on blocks
- improved parse error for mismatches
- add label checking for non-block constructs
- allow generate block to have label before begin
2021-06-15 17:47:32 -04:00
Zachary Snow e0e296349a check for unknown named bindings 2021-06-01 13:09:36 -04:00
Zachary Snow 13c84e4c7a refactor parameter binding resolution
- fix type/expr ambiguity for interface and class parameters
- check for parameter kind mismatch up front
- centralize key logic in ResolveBindings
2021-05-31 14:13:49 -04:00
Zachary Snow c0282862ea error if procedural block has a decl after a stmt 2021-05-29 21:55:50 -04:00
Zachary Snow eae46b7ad2 improved interface modport type checking 2021-05-12 22:00:22 -04:00
Zachary Snow 68fa8290c0 interface instantiation checks for errant name resolution 2021-05-09 19:32:39 -04:00
Zachary Snow 12c57ecc24 preprocessor cleanup and extended test coverage 2021-05-06 16:14:41 -04:00
Zachary Snow 10b30d7d1e detect infinite include loops 2021-05-01 21:12:00 -04:00
Zachary Snow 5cc4dce01f refactor positional binding checking and resolution 2021-04-30 14:10:09 -04:00
Zachary Snow ba270acb0e forbid mixing ordered and named port or param bindings 2021-04-29 15:32:54 -04:00
Zachary Snow eeeade3e19 allow packages to reference their own items explicitly 2021-04-13 14:44:42 -04:00
Zachary Snow 7f79147c7b initial parameterized class data type support 2021-04-12 21:22:14 -04:00
Zachary Snow 38cc25fad6 more test coverage and dead code removal 2021-03-09 15:48:10 -05:00
Zachary Snow 31ebf181bb improved parse errors for certain unmatched tokens 2021-03-06 15:03:04 -05:00
Zachary Snow 77b2f8b6ce improve for decl error messaging 2021-03-05 19:58:44 -05:00
Zachary Snow 0d095e6afb updated case inside representation 2021-02-17 13:29:44 -05:00
Zachary Snow 5aea0ee95e add write adjacent mode 2021-02-03 09:30:30 -05:00
Zachary Snow 8eb3a251f7 package conversion overhaul
- full import and export support
- simplify AST representation of import and export
- allow package-scoped identifiers invoked as subroutines
- use scoped name resolution for identifiers in packages
- merge package item nesting conversion into package conversion
- fix handling of colliding enum items in separate modules
- fix visiting enum item exprs in types
2021-01-23 21:54:39 -07:00
Zachary Snow ea56f51d03 support for parameters without defaults 2021-01-21 11:55:23 -07:00
Zachary Snow e94c0346e8 add optional error message patterns to error test suite 2021-01-20 15:34:18 -07:00
Zachary Snow 5891a0eb7d improve edge case messaging
- error for unbound module instance interface ports
- warning for converting an interface alone
- warning for converting a package alone
- update terminology for modules removed by interface conversion
2020-12-30 17:17:27 -07:00
Zachary Snow 2311d3e2d6 additional interface conversion test coverage 2020-12-11 12:41:20 -07:00
Zachary Snow bf6ba338df additional default_nettype test coverage 2020-12-04 11:38:17 -07:00
Zachary Snow 3ac1b4ea3c additional error case coverage 2020-12-03 19:02:33 -07:00
Zachary Snow 359a3de91e parser rejects errant declarations 2020-07-22 21:35:25 -06:00
Zachary Snow 5ed053d317 add error test suite 2020-06-07 16:47:27 -04:00