Zachary Snow
5f26e755c9
preserve implicitness of task and function ports
2021-04-10 20:45:40 -04:00
Zachary Snow
dce7f14909
fix precedence of non-blocking assignment
2021-04-08 17:04:28 -04:00
Zachary Snow
2a4d1cc5a8
more useful error message on bad stmt asgn
2021-04-08 00:42:18 -04:00
Zachary Snow
c6dbdd09ca
preliminary language support for basic classes
2021-03-22 20:01:38 -04: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
da07619642
support const declarations of alias types
2021-02-23 16:45:53 -05:00
Zachary Snow
2b9fff78e7
fix indentation inconsistencies
2021-02-19 15:04:23 -05:00
Zachary Snow
ec766657a8
simplify value range representation
2021-02-17 17:12:57 -05:00
Zachary Snow
4bfcfe4b28
module item attrs aren't mapped onto trace statements
2021-02-17 13:35:10 -05:00
Zachary Snow
0d095e6afb
updated case inside representation
2021-02-17 13:29:44 -05:00
Zachary Snow
275130e0b0
move package param step to conversion
2021-01-27 16:41:39 -05:00
Zachary Snow
b28a3cac0d
represent typedefs as localparam types
2021-01-24 10:07:35 -07:00
Zachary Snow
378ede9e1a
standardize internal representation of unknown types
2021-01-24 09:55:03 -07: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
40df902887
parser production rule for optional assignments
2021-01-21 12:05:44 -07:00
Zachary Snow
ea56f51d03
support for parameters without defaults
2021-01-21 11:55:23 -07:00
Zachary Snow
c39371c48a
simplify and optimize lexing
2020-12-10 13:33:06 -07:00
Zachary Snow
2081f6a32a
support attributes on port declarations
2020-12-08 11:28:28 -07:00
Zachary Snow
1fd72d878f
fix double backtick handling in backtick string
2020-12-04 13:22:38 -07:00
Zachary Snow
091520e4cd
allow generate scoped basic subroutine invocations in statement blocks
2020-11-30 20:36:06 -07:00
Zachary Snow
82290b16ee
simplify lexer character position lookup
2020-11-27 14:29:59 -07:00
Zachary Snow
e471d37e5c
preprocessor batch consumption
2020-11-27 12:05:32 -07:00
Zachary Snow
eb908b8db7
fix ordering of and outputs
2020-09-13 23:24:21 -04:00
Zachary Snow
e4135bb896
use strict State and Writer monads
2020-08-11 19:14:18 -04:00
Zachary Snow
67466eaa60
major interface conversion update
...
- module instances with modport bindings are now inlined
- support for modports in generate loops
- support for generic interfaces
- implied modport instance propagation
- add error message for interface instances missing port list
2020-08-08 20:43:47 -06:00
Zachary Snow
359a3de91e
parser rejects errant declarations
2020-07-22 21:35:25 -06:00
Zachary Snow
bf1d9283d7
interpret package parameters as localparams
2020-07-13 18:54:45 -06:00
Zachary Snow
d88c516d33
enhanced handling of number literals
...
- number literals are parsed rather than stored as strings
- fix array query functions used on non-trivial number literals
- more efficient expression simplification recursion
- expanded constant folding scenarios
2020-07-12 15:06:27 -06:00
Zachary Snow
69b2e86aee
remove pattern synonyms which introduced excessive overhead
2020-07-09 21:01:18 -06:00
Zachary Snow
219a57c37b
preliminary language support for parameterized class scopes
2020-07-08 17:46:37 -06:00
Zachary Snow
8d37db30e5
support complex modport expressions
...
- modports can use complex expressions
- update interface_infer test for consistency across simulators
- fix interface inlining of implicitly typed data declarations
2020-06-19 20:32:37 -04:00
Zachary Snow
64f3067d78
allow dimension shorthand for instance arrays
2020-06-17 22:26:27 -04:00
Zachary Snow
3cfd368bc2
support multi-dimensional instances
2020-06-17 22:18:08 -04:00
Zachary Snow
12be569742
reduce usage of maybe
2020-06-14 15:56:09 -04:00
Zachary Snow
9adb7522e9
improve stmt representation
2020-06-09 21:18:31 -04:00
Zachary Snow
ae392d4536
fix single bit enum sizing
...
- single bit localparams retain explicit range
- fix $bits on unsized literals
- use Implicit over Maybe for underlying type
2020-06-05 21:32:02 -04:00
Zachary Snow
790312d25d
vim modelines for Lex.x and Parse.y
2020-05-06 19:03:32 -04:00
Zachary Snow
543a104683
upgrade to stackage lts-14.26
2020-04-05 13:45:31 -04:00
Zachary Snow
b8d512e31f
remove unneeded imports
2020-04-05 13:45:22 -04:00
Zachary Snow
bcafef8d01
allow empty list_of_parameter_assignments
2020-03-30 19:27:44 -04:00
Zachary Snow
1687b1c5c1
allow empty parameter_port_list ( resolves #83 )
2020-03-25 23:55:19 -04:00
Rupert Swarbrick
78f3db8803
Fail more gracefully on mismatched `if/`elsif/`else/`endif
...
Without this patch, a stray `endif caused sv2v to take the tail of an
empty list. Now we raise a lexical error.
To do this, the patch pulls the "push" and "pop" logic for the
preprocessor condition stack into separate helper
functions (pushCondStack and popCondStack). It also defines some
helper functions for manipulating Cond's.
The patch also adds a documentation comment explaining what the
different values of Code meant (because I had to squint to work it
out).
2020-03-23 20:19:25 -04:00
Zachary Snow
35e75c0604
language support for strengths
2020-03-20 21:13:57 -04:00
Zachary Snow
bd68ab0852
faster parsing of very long files
2020-03-20 18:53:06 -04:00
Zachary Snow
f44e3e808a
add option to skip preprocessing
2020-03-18 20:02:20 -04:00
Zachary Snow
dd9f040f1f
improved handling of genvars
2020-02-23 22:30:17 -05:00
Zachary Snow
ad21277eb5
support macro names comprised of macro args and macros
2020-02-16 22:18:12 -05:00
Zachary Snow
463cdcb2c1
support complex sizes in size casts ( resolves #69 )
2020-02-15 16:48:09 -05:00
Zachary Snow
104f98011e
support for string literals with macros
...
- adds support for using macros and macro arguments within the argument
list to other macros
- fixes an issue where macros with arguments would have extraneous
whitespace
- fixes handling of multiline string literals
2020-02-12 23:58:41 -05:00
Zachary Snow
fc9999aeea
support implied port directions
2020-02-08 22:48:21 -05:00
Zachary Snow
4b3b09d2db
allow extraneous semicolons in generate blocks
2020-02-08 22:15:35 -05:00
Zachary Snow
3c08767b63
redesigned preprocessor and lexer
2020-02-06 23:33:13 -05:00
Zachary Snow
2dcd35ade7
support typedefs with unpacked dimensions
2020-02-02 21:40:43 -05:00
Zachary Snow
a402a73477
alias macromodule to module
2020-02-01 16:45:33 -05:00
Zachary Snow
1a9068409e
forbid illegal macro names
2020-02-01 16:42:25 -05:00
Zachary Snow
9694799a23
more consistent procedural assignment support
2020-02-01 15:52:52 -05:00
Zachary Snow
610d9abacf
support for gates with delays
2020-01-31 20:24:37 -05:00
Zachary Snow
dd0eb5981d
added source trace comments
...
- Trace comments cover module items, decls, and stmts
- Added pseudo-lexer to Alex parser for monadic Position production
- Added Position to every DeclToken
- Removed Comment PackageItem
- Added CommentStmt and CommentDecl
- Fixed traversal skipping outer MIAttr ModuleItems
- Generally cleaned up Parser modules
2020-01-30 22:17:17 -05:00
Zachary Snow
9f180f91e5
improve `line error message
2020-01-27 19:23:36 -05:00
Zachary Snow
ad98c14547
fix handling of macros at EOF ( resolves #62 )
2020-01-27 19:18:58 -05:00
Zachary Snow
cf4c2a5491
expanded support for macros in preprocessor directives
2020-01-14 23:19:39 -05:00
Zachary Snow
22d6ba4927
support evaluating functions as statements
2020-01-11 21:06:09 -05:00
Zachary Snow
b58248fc2c
support type operator on simple expressions
2020-01-11 16:22:07 -05:00
Zachary Snow
82217ec05c
updated lifetime representation; struct packers use automatic
2019-12-22 12:01:05 -05:00
Zachary Snow
7ea5b60d0b
support for inside case statements
2019-12-21 20:41:19 -05:00
Zachary Snow
ba79b17bd9
pragma and line directive validation
2019-12-09 21:45:11 -05:00
Zachary Snow
fb5fd39388
support for inside expression ranges and wildcards
2019-12-08 17:36:25 -05:00
Zachary Snow
96fe986b2d
cleanup case representation
2019-12-01 23:25:33 -05:00
Zachary Snow
58ad1feab1
allow reading from stdin
2019-11-19 23:29:19 -05:00
Zachary Snow
eebe41427e
language support for final blocks
2019-10-31 20:39:11 -04:00
Zachary Snow
3597f4a6be
support for methods (no conversion) and interface TFs
2019-10-19 16:22:46 -04:00
Zachary Snow
336b180d74
lexer handles carriage returns ( closes #51 )
2019-10-19 13:27:29 -04:00
Zachary Snow
8e8d44f421
allow array struct fields
2019-10-13 23:59:36 -04:00
Zachary Snow
de581ecaf5
initial support for types in struct patterns
2019-10-13 19:01:42 -04:00
Zachary Snow
c722e931fe
allow time delay values
2019-10-11 22:56:16 -04:00
Zachary Snow
1e35ba269d
allow repeat shorthand in patterns
2019-10-11 22:54:21 -04:00
Zachary Snow
fea5ff44eb
coalesce tokens across nested macros
2019-10-11 22:53:08 -04:00
Zachary Snow
d86f8535a0
support for begin_keywords directive
2019-10-11 19:32:10 -04:00
Zachary Snow
b660cfbd4e
allow tabs in preprocessor directives
2019-10-10 22:10:59 -04:00
Zachary Snow
167c65db11
pass through downstream compiler directives
2019-10-10 20:53:49 -04:00
Zachary Snow
6d79e0b491
updated number literals
2019-10-10 19:01:09 -04:00
Zachary Snow
149d16d8fc
add support for `line directive
2019-10-10 19:00:49 -04:00
Zachary Snow
e23d68a652
discard const keyword
2019-10-09 22:16:58 -04:00
Zachary Snow
910282fbf7
allow parens around senses
2019-10-09 22:16:57 -04:00
Zachary Snow
d2976170f3
allow extraneous semicolons after package items
2019-10-09 22:16:38 -04:00
Zachary Snow
9880885412
Revert "allow escaped newline in macro arguments"
...
This reverts commit ba7fbd5506 .
2019-10-09 00:36:23 -04:00
Zachary Snow
8ae89a7bd4
support and convert jumps: break, continue, and return
2019-10-08 23:50:26 -04:00
Zachary Snow
08c38e6193
support time literals as expressions
2019-10-06 21:21:58 -04:00
Zachary Snow
1a394cff9c
support mintypmax expressions
2019-10-06 16:18:15 -04:00
Zachary Snow
f0368714e1
support generate for without explicit block
2019-10-06 15:36:29 -04:00
Zachary Snow
a1735ffef7
fix lexing identifiers and numbers across macro boundaries
2019-10-06 15:16:48 -04:00
Zachary Snow
ba7fbd5506
allow escaped newline in macro arguments
2019-10-03 23:29:49 -04:00
Zachary Snow
9524f0028b
support identifier delay values
2019-10-03 20:38:38 -04:00
Zachary Snow
77dd1011e3
support multiple assignments in one `assign`
2019-10-03 19:37:42 -04:00
Zachary Snow
2b84bdb7e2
support for type param without parameter keyword
2019-10-01 22:02:30 -04:00
Zachary Snow
ceb384f680
support multiline strings
2019-09-30 23:53:18 -04:00
Zachary Snow
c6eedb9f26
pass through named events
2019-09-30 23:22:05 -04:00
Zachary Snow
b7959c7aa2
support for statement labels and basic fork-join
2019-09-30 23:03:55 -04:00
Zachary Snow
d57c967090
added partial support for implicitly sized arrays
2019-09-28 16:57:36 -04:00