Commit Graph

79 Commits

Author SHA1 Message Date
Ethan Sifferman bc79e30fe5
convert severity and elaboration system tasks (#276) 2024-09-02 23:41:29 -04:00
Zachary Snow ba94920ee0 assign a unique identifier to every genvar 2023-08-11 21:52:03 -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 9bab0448e3 drop explicit string type from parameters 2023-01-07 18:27:25 -07:00
Zachary Snow 086eb78688 elaborate accesses to fields of struct constants 2022-10-23 11:52:22 -07:00
Zachary Snow 6e8659a537 support hierarchical calls to functions with no inputs 2022-07-10 22:43:33 -04:00
Zachary Snow f68bf187af refactor event control internals
- event expressions use Expr over LHS
- stricter AST representation of event controls
- property specs use event expressions directly
2022-04-11 17:44:47 -06:00
Zachary Snow ed09fe88cf support assignments within expressions 2022-03-12 23:57:17 +01:00
Zachary Snow 4ced649a87 convert do while loops 2022-03-11 11:32:54 +01:00
Zachary Snow e6e96b622b support for edge event 2022-02-16 12:01:58 +01:00
Zachary Snow 3abe12dfbd support exclusion of the unbased unsized conversion 2021-10-03 15:00:59 -06:00
Zachary Snow 95c2bc996c support for common non-ANSI style port declarations
Specifically, support has been added for non-ANSI style port
declarations where the port declaration is separate from the
corresponding net or variable declaration.
2021-09-06 21:10:49 -04:00
Zachary Snow 407ba59042 add internal --dump-prefix utility 2021-09-05 19:54:36 -04:00
Zachary Snow 57ef23ef73 fewer conversion phases in main loop
- moved 4 phases to initial set and 3 to final set
- fix synthetic unnamed genblocks preventing name resolution
- asgnop conversion folds in unisub when possible
2021-07-15 21:37:44 -04:00
Zachary Snow bfd0cee0dc improved handling of procedural for loops
- convert loops with no or many incrementations
- restrict AST node to only contain traditional initializations
- parser elaborates for loop decls into a synthetic block
- decl list codegen is now specific to parameter decl lists
- update jump conversion special cases for new representation
- first experiments with bimapM
2021-07-14 15:50:12 -04:00
Zachary Snow 9d7f917608 handle naming and scoping of unnamed generate blocks 2021-06-30 14:24:35 -04:00
Zachary Snow 5cc4dce01f refactor positional binding checking and resolution 2021-04-30 14:10:09 -04:00
Zachary Snow 04d6fa6199 fix additional type parameter instantiation issues
- avoid premature conversion of default struct type parameters
- allow use of $clog2, $signed, and $unsigned in type parameters
- more thorough and efficient top reference ident renaming
- precede type param conversion with hier const pass
2021-04-13 22:22:33 -04:00
Zachary Snow 87ea9de853 substitute constants from type information across scopes 2021-02-10 12:56:26 -05:00
Zachary Snow d847fdfaca split phases into sections 2021-02-08 12:42:34 -05:00
Zachary Snow dd1a9efb40 refactor cast conversion
- delegate cast type and sign resolution to TypeOf conversion
- internal support for injecting data declarations into statements
- fix size and sign of unbased unsized literals used in casts
- avoid generating many unnecessary explicit casts
- support casts which depend on localparams within procedures
- expression traversal correctly visits types within type casts
- fix typeof on expressions of net types
- handle additional edge cases for unsized integer array patterns
- preserve signedness of implicitly flattened unpacked integer arrays
2021-02-03 16:28:53 -05:00
Zachary Snow b8759776ca limited progress on typeof signedness
- ensure concats and repeats stay unsigned
- defer unbased-unsized conversion to enable cast semantics
- disable inaccurate folding of binary operations of based numbers
- fix typeof and size cast binop signedness logic
- fix typeof $unsigned and $signed
- test harness allows production of `integer unsigned`
2021-02-01 10:17:50 -05: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 ea56f51d03 support for parameters without defaults 2021-01-21 11:55:23 -07:00
Zachary Snow 5c0f414dfa convert wildcard bindings before interfaces 2020-12-03 11:03:09 -07:00
Zachary Snow 7e2450ea5e conversion to create declarations for implicit nets 2020-09-13 23:35:41 -04:00
Zachary Snow e80db12422 conversion for implicitly variably sized parameters 2020-08-12 21:59:57 -04:00
Zachary Snow 50d6faa9b0 yosys-compatible simple loop jump conversion 2020-07-27 18:50:26 -06:00
Zachary Snow a7673c55fd automatically fix simple declaration order issues 2020-07-08 22:20:40 -06:00
Zachary Snow a0c3112b6c flatten tf blocks with decls 2020-05-05 19:32:37 -04:00
Rupert Swarbrick f5881919c1 Allow exclusion of Assert conversion
Yosys does support some asserts nowadays. Allowing sv2v to not strip
them out means that you can check formal properties without needing
hierarchical references (which Yosys really doesn't cope well with!)
2020-03-16 23:34:05 -04:00
Zachary Snow dd9f040f1f improved handling of genvars 2020-02-23 22:30:17 -05:00
Zachary Snow c876c447e6 fix interface inlining renaming 2020-02-09 22:17:48 -05:00
Zachary Snow 22d6ba4927 support evaluating functions as statements 2020-01-11 21:06:09 -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 fb5fd39388 support for inside expression ranges and wildcards 2019-12-08 17:36:25 -05:00
Zachary Snow c936b39bd2 use system functions for signedness casts 2019-10-20 16:18:18 -04:00
Zachary Snow 8ae89a7bd4 support and convert jumps: break, continue, and return 2019-10-08 23:50:26 -04:00
Zachary Snow 454afa97a3 major array pack and flatten update (closes #48)
- dimensions flattening conversion only flattens packed dimensions
- conversion for packing arrays when necessary (preserves memories)
- added coverage for array with multiple packed dimensions
- test runner no longer forbids multi-dim accesses after conversion
- Decl and subordinate types derive Ord
2019-09-26 23:11:59 -04:00
Zachary Snow c7f51209df remove extraneous explicit unsigned (resolves #45) 2019-09-24 23:35:06 -04:00
Zachary Snow ba4cf805ff preliminary conversion for size casts 2019-09-18 23:39:09 -04:00
Zachary Snow 77b9d2f085 support and conversion for foreach 2019-09-15 16:32:19 -04:00
Zachary Snow 2ca8a022ad support and conversion for -> and <-> 2019-09-15 13:55:40 -04:00
Zachary Snow e27d6920a7 conversion for array query system functions (resolves #37) 2019-09-14 16:46:51 -04:00
Zachary Snow a14d078230 substitution conversion for size casts (closes #27) 2019-09-11 22:52:01 -04:00
Zachary Snow 4de585ec0f initial parameter type conversion 2019-09-11 09:27:18 +02:00
Zachary Snow 41bba1b2f2 generate localparams for all package enums (closes #26) 2019-09-04 20:59:41 -04:00
Zachary Snow af4711a8cf preliminary stream conversion 2019-09-03 23:36:29 -04:00