Commit Graph

34 Commits

Author SHA1 Message Date
Brett Witherspoon 979053855c sv: improve support for wire and var with user-defined types
- User-defined types must be data types. Using a net type (e.g. wire) is
  a syntax error.
- User-defined types without a net type are always variables (i.e.
  logic).
- Nets and variables can now be explicitly declared using user-defined
  types:

    typedef logic [1:0] W;
    wire W w;

    typedef logic [1:0] V;
    var V v;

Fixes #2846
2021-08-12 22:41:41 -06:00
Marcelina Kościelnicka fd79217763 Add v2 memory cells. 2021-08-11 13:34:10 +02:00
Xiretza 92d5550a90 verilog: check entire user type stack for type definition 2021-03-21 19:35:13 -04:00
Kamil Rakoczy d69ddf19da Add typedef input/output test
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2021-01-18 17:31:22 +01:00
Xiretza acd47bbd52
tests: Centralize test collection and Makefile generation 2020-09-21 15:07:02 +02:00
clairexen f176bd7778
Merge pull request #2329 from antmicro/arrays-fix-multirange-size
Rewrite multirange arrays sizes [n] as [n-1:0]
2020-09-17 18:27:05 +02:00
clairexen 9e937961dc
Merge pull request #2330 from antmicro/arrays-fix-multirange-access
Fix unsupported subarray access detection
2020-09-17 18:21:53 +02:00
clairexen 87b9ee330d
Merge pull request #2122 from PeterCrozier/struct_array2
Support 2D bit arrays in structures. Optimise array indexing.
2020-08-19 17:58:37 +02:00
N. Engelhardt 850f66cfdd include both power-of-two and non-power-of-two testcases 2020-08-18 18:54:22 +02:00
Lukasz Dalek daee2d967f Add test for subarray access on multidimensional arrays
Signed-off-by: Lukasz Dalek <ldalek@antmicro.com>
2020-08-03 17:07:33 +02:00
Lukasz Dalek 6e78f3a197 Test multirange (unpacked) arrays size
Signed-off-by: Lukasz Dalek <ldalek@antmicro.com>
2020-08-03 15:34:55 +02:00
Kazuki Sakamoto 6bf75be73b static cast: add tests 2020-06-19 17:40:38 -07:00
Peter Crozier 01ec681373 Support 2D bit arrays in structures. Optimise array indexing. 2020-06-08 20:34:52 +01:00
Peter Crozier 76c499db71 Support packed arrays in struct/union. 2020-06-07 18:33:11 +01:00
Peter Crozier 0d3f7ea011
Merge branch 'master' into struct 2020-06-03 17:19:28 +01:00
Peter Crozier 17f050d3c6 Allow structs within structs. 2020-05-12 17:20:34 +01:00
Peter Crozier f482c9c016 Generalise structs and add support for packed unions. 2020-05-12 14:25:33 +01:00
Peter Crozier 0b6b47ca67 Implement SV structs. 2020-05-08 14:40:49 +01:00
whitequark 66d0ed2bcc ast/simplify: don't bitblast async ROMs declared as `logic`.
Fixes #2020.
2020-05-05 04:16:59 +00:00
Jeff Wang 249876b614 support using previously declared types/localparams/params in package
(parameters in systemverilog packages can't actually be overridden, so
allowing parameters in addition to localparams doesn't actually add any
new functionality, but it's useful to be able to use the parameter
keyword also)
2020-04-07 00:38:15 -04:00
Peter Crozier ecc22f7fed Support module/package/interface/block scope for typedef names. 2020-03-23 20:07:22 +00:00
Peter 6d8d6b402f Revert typedef tests to standard grammar. 2020-03-22 18:20:46 -07:00
Jeff Wang d12ba42a74 add attributes for enumerated values in ilang
- information also useful for strongly-typed enums (not implemented)
- resolves enum values in ilang part of #1594
- still need to output enums to VCD (or better yet FST) files
2020-02-17 04:42:42 -05:00
Jeff Wang 8ef5c7d48c scoped enum tests 2020-01-16 18:13:30 -05:00
Jeff Wang caf35896da enum in package test 2020-01-16 18:09:03 -05:00
Jeff Wang febe7706a2 simple enum test 2020-01-16 18:09:03 -05:00
Clifford Wolf e84cedfae4 Use "(id)" instead of "id" for types as temporary hack
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-10-14 05:24:31 +02:00
David Shah 9b9d24f15b sv: Improve tests
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:45 +01:00
David Shah abc155715d sv: Add test scripts for typedefs
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:14 +01:00
David Shah af25585170 sv: Add support for memories of a typedef
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:14 +01:00
David Shah 30d2326030 sv: Add support for memory typedefs
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:14 +01:00
David Shah e70e4afb60 sv: Fix typedefs in packages
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:14 +01:00
David Shah c962951612 sv: Fix typedef parameters
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:14 +01:00
David Shah f6b5e47e40 sv: Switch parser to glr, prep for typedef
Signed-off-by: David Shah <dave@ds0.me>
2019-10-03 09:54:14 +01:00