Commit Graph

81 Commits

Author SHA1 Message Date
Zachary Snow 261beffd0f scope bit-indexed modport binding 2024-04-16 08:40:26 -04:00
Zachary Snow deed2d9fc5 enable PatternSynonyms and TupleSections everywhere 2023-08-11 22:58:15 -04:00
Zachary Snow a209335c30 disambiguate typenames and interface names 2023-08-09 22:45:52 -04:00
Zachary Snow 911243dac4 add --top for filtering uninstantiated modules 2023-06-18 22:36:43 -04:00
Zachary Snow 83f2dbde6b clean up interface check decl type 2023-05-08 23:55:58 -04:00
Zachary Snow 1b8aace145 check for module or interface names used as type names 2023-05-07 13:45:56 -04:00
Zachary Snow 59b416f9b4 isolate interface name resolution checks 2022-07-17 20:32:56 -04:00
Zachary Snow d1d81eb8d6 use scoped errors in interface conversion 2021-10-07 21:06:45 -06:00
Zachary Snow 55afc58f73 simplify interface parameter override logic 2021-09-20 23:49:43 -04:00
Zachary Snow 6788ecbf82 fix interface traversal of exprs in types, and support module-scoped modport refs 2021-09-18 21:01:28 -04:00
Zachary Snow e42fbfa23c restructure scoper run and eval interface 2021-09-16 23:35:16 -04:00
Zachary Snow 30acc3e3f9 fix spacing of as-patterns for future GHC upgrade 2021-08-12 16:13:12 -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 b2fe865e17 fix interface modport substitution strategy
The interface conversion no longer substitutes parameters immediately,
instead fully scoping modports and allowing hierarchical constants to be
resolved separately. This fixes an issue where struct parameters could
lose their type information during substitution. The conversion also now
handles renaming references to the module or interface top-level scope.
2021-07-20 22:36:59 -04:00
Zachary Snow ac548cacfc improved source position trace comments
- remove needless comments generated during interface conversion
- filter null statements even in verbose mode
- hoist trace comment statements if doing so would prevent the need to
  wrap a task or function body in a block
- add traces for global declarations
- add traces for parameter declaration lists
- add traces for module items within generate blocks
- avoid generating duplicate traces before declarations
2021-07-11 20:43:30 -04:00
Zachary Snow 2f7128428e fix errant untyped localparam substitution 2021-07-10 14:38:06 -04:00
Zachary Snow ff0c7b026c properly distinguish nets and variables internally
- new net decl to replace net pseudo-type
- support nets with complex base types, including typenames
- support var declaration type prefix for all data types
- support var as lone type shorthand
- refactor AST representation of strengths
- traversal helpers for treating nets as variables
- use decl traversals where appropriate
2021-07-02 17:59:21 -04:00
Zachary Snow 9d7f917608 handle naming and scoping of unnamed generate blocks 2021-06-30 14:24:35 -04:00
Zachary Snow afc3ea435b fix interface conversion erroneously renaming colliding pattern names 2021-06-23 21:39:15 -04:00
Zachary Snow 24a79ffebe support multi-dimensional modports 2021-06-02 15:36:44 -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 5cc4dce01f refactor positional binding checking and resolution 2021-04-30 14:10:09 -04:00
Zachary Snow c0b8ba17de simplify interface port type representation 2021-04-13 10:45:26 -04:00
Zachary Snow 38cc25fad6 more test coverage and dead code removal 2021-03-09 15:48:10 -05:00
Zachary Snow 87ea9de853 substitute constants from type information across scopes 2021-02-10 12:56:26 -05:00
Zachary Snow 490d96ba46 generate consistent hashes within interface conversion 2021-02-05 10:00:59 -05:00
Zachary Snow 378ede9e1a standardize internal representation of unknown types 2021-01-24 09:55:03 -07:00
Zachary Snow ea56f51d03 support for parameters without defaults 2021-01-21 11:55:23 -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 2b377cef04 interface and instance array support
- support for interface instance arrays
- support for interface-using module instance arrays
- support for modport array bindings
- fix modport bindings shadowed in nested instances
2020-12-06 15:41:33 -07: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 219a57c37b preliminary language support for parameterized class scopes 2020-07-08 17:46:37 -06: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 4026ae8fa5 interface conversion respects shadowed variables 2020-06-20 15:56:01 -04:00
Zachary Snow 4bebb85c14 refactor interface conversion 2020-06-20 14:39:57 -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 8ae925d92e support modports depending on other interface data declarations 2020-06-19 20:07:57 -04:00
Zachary Snow 3cfd368bc2 support multi-dimensional instances 2020-06-17 22:18:08 -04:00
Zachary Snow 99428b2f16 expanded support for interfaces with parameters 2020-06-14 22:57:46 -04:00
Zachary Snow 12be569742 reduce usage of maybe 2020-06-14 15:56:09 -04:00
Zachary Snow b6f4f690e7 support simple bundle interfaces
- fix position modport-to-modport bindings
- inout logics converted to regs become outputs
2020-06-03 20:26:17 -04:00
Zachary Snow f381476161 support nested interfaces 2020-04-13 22:50:41 -04:00
Zachary Snow b8d512e31f remove unneeded imports 2020-04-05 13:45:22 -04:00
Zachary Snow 35e75c0604 language support for strengths 2020-03-20 21:13:57 -04:00
Zachary Snow c876c447e6 fix interface inlining renaming 2020-02-09 22:17:48 -05:00
Zachary Snow 8a008c3024 interface conversion supports positional port bindings
- also fixes an issue where system tasks were inadvertently prefixed
  during the interface conversion
2020-02-09 13:42:45 -05:00