Commit Graph

138 Commits

Author SHA1 Message Date
Zachary Snow e4adf6a74c apply reordering in generate blocks 2021-01-25 12:01:03 -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 b7b40af6b8 ensure collector results are evaluated 2020-12-10 18:30:23 -07:00
Zachary Snow 454f8dcb24 faster package item nesting traversal 2020-11-28 15:22:58 -07:00
Zachary Snow 99df32642e remove old traverseScopesM 2020-08-16 12:47:41 -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 49c0d297c9 fix package conversion not prefixing declarations with assignments (resolves #115) 2020-07-20 22:19:18 -06:00
Zachary Snow cc9f7f4658 remove old scopedConversion 2020-07-15 19:17:05 -06:00
Zachary Snow c28bb71ac5 more careful expr and type traversals 2020-07-15 18:44:57 -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 2961d1058b remove deprecated TFStrategy traversals 2020-07-09 21:01:42 -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 85e3d0f5b5 initial generate block scoping support
- significant refactor of struct conversion
- significant refactor of typedef conversion
- scoping support in multipack conversion
- scoping support in typeof conversion
2020-07-02 22:58:59 -06:00
Zachary Snow 0fb97f2381 remove over-specified traversal arguments 2020-06-20 23:08:40 -04:00
Zachary Snow 2535d689aa fix struct/interface/logic conversion interactions
- interface conversion only waits for type resolution of modports
- typeof conversion resolves struct field accesses
- logic conversion only converts logic data declarations
- struct conversion only converts within modules
- fix nested type traversal order causing premature struct conversion
2020-06-20 22:46:54 -04:00
Zachary Snow bd1c07231f experimenting with monad helpers 2020-06-20 16:41:13 -04: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 661703a8c2 address import resolution issues
- fix wildcard imports shadowing other items
- fix explicit imports depending on other items
- fix example export in package.sv
2020-06-18 21:18:08 -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 b58cf5bf07 remove empty generate conditionals 2020-06-07 14:26:53 -04:00
Zachary Snow 9249c9fa2b typdef conversion obeys generate scoping 2020-06-05 21:38: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 ec760964c7 remove empty initial blocks (resolves #89) 2020-06-02 08:29:12 -04:00
Zachary Snow 9042145695 substitute localparams into type params 2020-05-31 22:01:40 -04:00
Zachary Snow 9e7768b66a simplify folded procedural branches 2020-05-05 18:50:20 -04:00
Zachary Snow 35e75c0604 language support for strengths 2020-03-20 21:13:57 -04:00
Zachary Snow dd9f040f1f improved handling of genvars 2020-02-23 22:30:17 -05:00
Zachary Snow 400c009480 traversal performance improvements 2020-02-20 23:57:41 -05:00
Zachary Snow 4cf65dd4e2 support for struct type parameters
- param type conversion properly supports deferred param type resolution
- fixed struct conversion incomplete Subroutine traversal
- struct conversion excludes param types from conversion
- parameters are defaulted to have integer type
2020-02-09 17:31:24 -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 6e4a19d00b flatten generate blocks with one item 2020-01-31 19:43:34 -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 2bd24b6086 expand type operator support 2020-01-11 20:35:51 -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 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 39f0e9b40d minor perf optimization 2019-10-19 14:38:28 -04:00
Zachary Snow 37355920e0 cleaner AST output 2019-10-11 22:38:47 -04:00
Zachary Snow 167c65db11 pass through downstream compiler directives 2019-10-10 20:53:49 -04:00
Zachary Snow 8ae89a7bd4 support and convert jumps: break, continue, and return 2019-10-08 23:50:26 -04:00