Commit Graph

9541 Commits

Author SHA1 Message Date
Martin Whitaker ed75bc22ec Fix incorrect loop termination test when searching for typedefs. 2019-10-03 00:32:09 +01:00
Stephen Williams 1147881176 Merge branch 'master' of github.com:steveicarus/iverilog 2019-10-02 09:34:36 -07:00
Stephen Williams 30fbc020e6 Don't allow nil bytes in string literals. 2019-10-02 09:34:18 -07:00
Cary R eeae2bfee9 Fix a syntax issue found while compiling with gcc 5.4 2019-10-01 18:58:28 -07:00
Martin Whitaker 7cead04e6a Merge branch 'master' of github.com:steveicarus/iverilog 2019-10-02 00:16:18 +01:00
Stephen Williams 5651adf73a Handle breakage in nested module parsing. 2019-10-01 15:19:46 -07:00
Martin Whitaker 9bb2147fb5 Merge branch 'package-imports-rework' 2019-10-01 23:04:23 +01:00
Stephen Williams c62472f7ac Merge branch 'master' of github.com:steveicarus/iverilog 2019-10-01 09:29:30 -07:00
Stephen Williams da36cee8f0 Detect errors elaborating delay expressions. 2019-10-01 09:29:13 -07:00
Martin Whitaker 1cc872be8c Downward references may also activate potential imports. 2019-10-01 09:08:15 +01:00
Martin Whitaker 1fca7b41a4 Delay potential imports for task/function calls until end of scope.
A local task/function definition takes precedence, even if it appears
after the call.
2019-10-01 09:08:07 +01:00
Martin Whitaker 17f0dd7e6e Enable package imports in blocks. 2019-10-01 09:07:59 +01:00
Martin Whitaker c5c264400e Add support for package scope resolution for named events. 2019-10-01 09:07:54 +01:00
Martin Whitaker 12fe4f2bf3 Fix handling of wildcard-imported types.
Don't add them to the explicit imports until they are referenced legally.
Stop searching when a matching name is found, even if it isn't a type name.
2019-10-01 09:07:48 +01:00
Martin Whitaker b0142a6406 Add support for named events in packages. 2019-10-01 09:07:39 +01:00
Martin Whitaker 1e26a808ad Fix error message for failed elaboration of event expression. 2019-10-01 09:07:30 +01:00
Martin Whitaker f69eccf903 Merge remote-tracking branch 'origin/master' into package-imports-rework 2019-10-01 09:06:15 +01:00
Cary R ea4e41207c Update cppcheck standards that are checked 2019-09-30 22:14:15 -07:00
Stephen Williams 1d2259e0a7 Merge branch 'master' of github.com:steveicarus/iverilog 2019-09-30 13:14:58 -07:00
Stephen Williams 3cc6e74e38 Have $readmem() print a warning if there are too many digits in words.
If there are more digits than needed to fill a word, print a warning
message. The excess bits are thrown away, so there is no need for an
error.
2019-09-30 13:14:40 -07:00
Stephen Williams d232335d9d
Merge pull request #267 from sielicki/master
replace deprecated yacc directives
2019-09-30 08:23:38 -07:00
Stephen Williams 80478db6cc Support typedefs in class definitions. 2019-09-30 08:07:56 -07:00
Cary R 6d71870853 Merge branch 'master' of github.com:steveicarus/iverilog 2019-09-29 20:20:23 -07:00
Cary R 5047aa2839 Add support for recursive function support for always_* sensitivity 2019-09-29 20:20:10 -07:00
Stephen Williams 185586e5ec Merge branch 'master' of github.com:steveicarus/iverilog 2019-09-29 18:37:39 -07:00
Stephen Williams 50d71c8512 Support for enumerations in classes. 2019-09-29 18:27:27 -07:00
Cary R e4ef928751 Fix some space issues 2019-09-29 17:11:19 -07:00
Cary R ba82ef463e Fix some always_* issues 2019-09-29 16:59:59 -07:00
Nicholas Sielicki 031caca8ca
replace deprecated yacc directives
bison 3.4.2 complains when encountering '%pure-parser':
"warning: deprecated directive, use ‘%define api.pure’"

A quick google suggests this option has been around since at least
2012, maybe longer, so probably safe to replace.

Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
2019-09-29 18:19:45 -05:00
Cary R 8a85d62ec7 Update to latest GTKWave files 2019-09-29 09:59:56 -07:00
Martin Whitaker e73da43cc1 Remove obsolete checks for name collisions during elaboration.
This is now handled by the parser.
2019-09-27 22:19:30 +01:00
Martin Whitaker 439688fa46 Add anonymous enums to the scope local symbols. 2019-09-27 22:19:30 +01:00
Martin Whitaker 2ae910750b Put generate case item block names in correct scope.
The compiler creates an artificial scope around the case items. We need
to add the block names to the real containing scope.
2019-09-27 22:19:30 +01:00
Martin Whitaker 03c4c63df1 Fix file/line reported for duplicate named blocks. 2019-09-27 22:19:30 +01:00
Martin Whitaker 628f5645bf Fix file/line reported for duplicate parameter declarations.
We need to retain the old parameter information until we have reported
the error.
2019-09-27 22:19:30 +01:00
Martin Whitaker d3bced57cc Correctly handle explicit and wildcard package imports.
Explicit imports should always conflict with local declarations using
the same name. Wildcard imports only conflict if they are referenced
before a local declaration with the same name.

This also unifies the detection of identifier conflicts.
2019-09-27 22:19:30 +01:00
Martin Whitaker b88d91c617 Create new base class for all named items that can be added to a scope.
Provide a helper function to identify the derived classes when reporting
errors.
2019-09-27 22:19:30 +01:00
Martin Whitaker 269ec2f042 Remove redundant checks for package imports during parsing.
The find_* and symbol_search functions now handle this.
2019-09-27 22:19:30 +01:00
Martin Whitaker 55219773fd Allow nested scopes to use their parent's imports. 2019-09-27 22:19:30 +01:00
Stephen Williams d7ee6bb6bb Support struct member part selects in l-values. 2019-09-27 13:51:51 -07:00
Stephen Williams 65aff65344 Better job choosing unique scope-local symbols during elaboration. 2019-09-25 12:18:41 -07:00
Stephen Williams ecd7b39244 Merge branch 'master' of github.com:steveicarus/iverilog 2019-09-24 15:05:51 -07:00
Stephen Williams 7b66de0711 Handle nested packed strucdts in r-values. 2019-09-24 15:05:39 -07:00
Martin Whitaker 714b211d9f Document the iverilog '-i' option in the man page. 2019-09-23 20:10:38 +01:00
Martin Whitaker abd63e80e1 With '-i', don't return an error when there are no top-level modules.
The '-i' option is there to allow the compiler to be used to check an
incomplete design for errors. With no top-level modules, nothing will
be elaborated, but at least will be checked for syntax errors.
2019-09-23 20:05:03 +01:00
Martin Whitaker 791c056b77 Document -gassertions/-gno-assertions in driver man page. 2019-09-20 21:30:43 +01:00
Martin Whitaker 823a508d6b Implement SV immediate assertions. 2019-09-20 21:30:43 +01:00
Stephen Williams 9e10645722 Merge branch 'master' of github.com:steveicarus/iverilog 2019-09-17 14:12:43 -07:00
Stephen Williams 2aa7700970 Add support for packed arrays in nested struct l-values. 2019-09-17 13:34:36 -07:00
Stephen Williams 1c281c2d77 Support nested struct l-values. 2019-09-16 13:50:17 -07:00