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
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
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
dd9f040f1f
improved handling of genvars
2020-02-23 22:30:17 -05:00
Zachary Snow
463cdcb2c1
support complex sizes in size casts ( resolves #69 )
2020-02-15 16:48:09 -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
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
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
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
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
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
167c65db11
pass through downstream compiler directives
2019-10-10 20:53: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
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
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
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
Zachary Snow
f4181aba76
added pass-through support for strings
2019-09-24 22:09:18 -04:00
Zachary Snow
bce438c841
default case can be anywhere in case block
2019-09-24 22:09:08 -04:00
Zachary Snow
2d8e6bddd3
parser rejects function input decls with bad directions
2019-09-22 23:29:02 -04:00
Zachary Snow
82218848fc
allow post inc/dec as first stmt in a block
2019-09-18 23:39:09 -04:00
Henner Zeller
e2f044ec4a
Place <file>:<line>:<col> first in an error message
...
This is the same as most compilers (e.g. gcc and clang) but also
verilog tools (e.g. yosys) output error mesasge in a standardized form.
This form can immediately be parsed by IDE tools that can jumping
through a list of error messages, placing the cursor at the given
file position.
This change simply re-arranges the error message printing to conform to that
standard.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2019-09-18 19:16:37 -04:00
Zachary Snow
191922e2a7
plain typedef forward declaration
2019-09-17 20:44:50 -04:00
Zachary Snow
1078603bfd
support complex constant expression size casts
2019-09-17 19:49:38 -04:00
Zachary Snow
512d4b1a7f
support module "list of param assignments" shorthand
2019-09-17 19:48:08 -04:00
Zachary Snow
bdafb60dec
lexical and parse errors print to stderr
2019-09-17 19:34:56 -04:00
Zachary Snow
7267f94b0b
allow signing on net types ( closes #40 )
2019-09-16 19:50:30 -04:00
Zachary Snow
5d80c83092
support for module attributes ( resolves #39 )
2019-09-15 23:17:14 -04:00
Zachary Snow
77b9d2f085
support and conversion for foreach
2019-09-15 16:32:19 -04:00
Zachary Snow
7f701cd112
fixed dimension shorthand diretion and relevant tests
2019-09-15 16:30:53 -04:00
Zachary Snow
2ca8a022ad
support and conversion for -> and <->
2019-09-15 13:55:40 -04:00
Zachary Snow
f5d6683422
generalization of array dimension(s) system functions
2019-09-14 12:38:26 -04:00
Zachary Snow
a14d078230
substitution conversion for size casts ( closes #27 )
2019-09-11 22:52:01 -04:00
Zachary Snow
6ddf782383
drop timeunit and timescale ( closes #31 )
2019-09-11 21:44:57 -04:00
Zachary Snow
a0068f60f2
remove old unused grammar rules
2019-09-11 19:32:04 +02:00
Zachary Snow
f8a2bcbea0
conversion for function void ( resolves #32 )
2019-09-11 19:31:50 +02:00
Zachary Snow
66989b0446
language support for parameter type bindings
2019-09-09 07:38:14 +02:00
Zachary Snow
d11e898edb
Added ParamType decl; combined parameter and localparam under Param
2019-09-09 07:34:43 +02:00
Zachary Snow
ad0db916cc
support typedef forward declarations
2019-09-04 23:41:24 -04:00
Zachary Snow
1a6e0ce9df
added support for inside expressions ( closes #28 )
2019-09-04 21:36:50 -04:00
Zachary Snow
33bea9e694
added remaining SV keywords
2019-09-04 21:02:02 -04:00
Zachary Snow
1f7c70dfe1
language support for LHS streaming operators
2019-09-02 20:46:35 -04:00
Zachary Snow
04de45b08b
language support for streaming operators
2019-09-01 18:42:16 -04:00
Zachary Snow
8f7968bf37
support data declarations with automatic lifetime ( closes #20 )
2019-08-31 15:36:27 -04:00
Zachary Snow
243f773657
convert for loop declarations and assignments to signle assignment ( closes #15 )
2019-08-30 00:12:01 -04:00
Zachary Snow
1472ea0cfe
convert unpacked parameter dimensions ( closes #18 )
2019-08-29 20:52:06 -04:00
Zachary Snow
1dad3a7502
parse and convert empty function arguments ( resolves #17 )
2019-08-28 20:29:35 -04:00
Zachary Snow
8a67a91166
added language support for (untagged) unions
2019-08-08 23:12:06 -04:00
Zachary Snow
9b7d003ea4
support for empty packages ( resolves #9 )
2019-08-07 21:58:20 -04:00
Zachary Snow
4fd7b6c2f2
better support for struct array parameters
...
This includes support for
- parsing dimensioned alias parameters
- flattening non-var decls with multiple packed dimensions
- converting arrays of structs
- inferring struct types for decls with initializations
2019-08-06 23:11:09 -04:00
Zachary Snow
e82537fa97
add support for localparams in module parameter list ( resolves #7 )
2019-08-06 19:53:19 -04:00
Zachary Snow
9c160c3d20
added support for package imports in module headers
2019-08-03 21:50:26 -04:00
Zachary Snow
d2c06b58bc
initial work towards fleshing out package conversion
2019-04-30 01:57:04 -04:00
Zachary Snow
bc23aebc55
added language support for package-scoped calls and typenames
2019-04-24 03:37:47 -04:00
Zachary Snow
33dc4b3f88
conversions are applied per-file
...
- NestTF refactored to cover all package items
- fixed issue where type traverse skipped typedefs
2019-04-23 18:51:39 -04:00
Zachary Snow
da38776d73
decls are now package items
2019-04-23 17:12:56 -04:00
Zachary Snow
d01df6110b
preliminary language support for packages
2019-04-23 15:53:51 -04:00
Zachary Snow
85d22d8d03
support for generate constructs outside of generate regions and genvar declarations in generate loops
2019-04-23 14:38:44 -04:00
Zachary Snow
88579c6d1f
logic conversion fixes produced reg-to-output bindings
...
- generally cleaned up and documented the Logic conversion
- made exprToLHS a shared helper function, now uses Maybe
- ported existing local exprToLHS helpers to the new one
2019-04-22 20:44:35 -04:00
Zachary Snow
4cbfd8fa1a
enum conversion explicitly sizes generated params and supports partial types
2019-04-18 21:01:29 -04:00
Zachary Snow
dca3a55fa6
support for indexed part select in first procedural Stmt
2019-04-08 22:02:49 -04:00
Zachary Snow
fb3d68e339
propper support for indexed part select addressing
2019-04-05 13:53:52 -04:00
Zachary Snow
383754fa7a
final major round of splitting and cleanup in the SystemVerilog module
2019-04-03 20:24:09 -04:00
Zachary Snow
6d0f7dd0a7
significantly stronger support, and proper handling of assertions
2019-04-03 19:08:30 -04:00
Zachary Snow
e79c95c5f0
some cleanup throughout the SystemVerilog module
2019-04-03 13:45:43 -04:00
Zachary Snow
c53b39319d
added support and conversion handling of the $bits system function
...
This also entailed further fleshing out the expression traversal helper
to cover expressions in generate blocks, which could, of course, use
$bits.
2019-04-02 00:16:09 -04:00
Zachary Snow
dc759dbb68
support for parameters of all types; fix named argument display bug
2019-03-31 14:25:09 -04:00
Zachary Snow
b45217bae9
hacky support for 'part-select addressing'
2019-03-30 02:50:45 -04:00
Zachary Snow
dd89e5c9ea
minor fixes
2019-03-30 01:56:57 -04:00
Zachary Snow
c4f5718f51
support for binary xnor
2019-03-30 01:33:49 -04:00
Zachary Snow
2314f97a96
support for call args with unnamed and named arguments
2019-03-30 01:27:48 -04:00
Zachary Snow
a432d75939
additional SystemVerilog language support
...
- unique0 and priority
- uniqueness on if statements
- preliminary discard-only parsing of assertions
- parameters with alias typenames
2019-03-30 00:47:42 -04:00
Zachary Snow
1a170f41c2
allow for stray semicolons in module items; allow for multiple struct field declarations on one line
2019-03-29 16:48:58 -04:00
Zachary Snow
848f8cbd61
support for ++ and -- as bare Stmts
2019-03-28 15:08:05 -04:00
Zachary Snow
713fb8a658
support for more complex for loop components
2019-03-27 01:53:26 -04:00