Commit Graph

572 Commits

Author SHA1 Message Date
Wilson Snyder 3a55600913 Internals: Restyle with C++11 using replacing typedef 2021-03-12 18:10:45 -05:00
Wilson Snyder 404b323f8c Internals: Remove some unnecessary typedefs. No functional change. 2021-03-12 17:26:53 -05:00
Wilson Snyder be31fdcfe4 Use Google-style-guide header guard naming, to avoid __ prefix. 2021-03-03 21:57:07 -05:00
Wilson Snyder 9650aefa42 Internals: Cleanup unneeded {}. No functional change 2021-02-21 21:25:21 -05:00
Wilson Snyder 975c1b39a9 Fix little endian packed array pattern assignment (#2795). 2021-02-20 20:29:28 -05:00
Pierre-Henri Horrein 3c849d7ce0
Generate SELRANGE instead of errors for potentially unreachable code (#2625) (#2754)
When using a "if" statement inside an always block, part of the code may
be unreachable. This can be used to avoid errors, but it generated an
error, this commit demotes this to a warning. Partly fixes #2625.
2021-01-15 07:31:48 -05:00
Wilson Snyder bd602d0e2d Copyright year update 2021-01-01 10:29:54 -05:00
Wilson Snyder c39a8b439a Internals: Use emplace instead of insert(make_pair(...)). No functional change intended. 2020-12-18 18:24:47 -05:00
Yutetsu TAKATSUKASA 7821da6ad5
Fix DPI-C and protect-lib if port is implicit logic (#2699) 2020-12-15 09:51:14 -05:00
Wilson Snyder 82fc142c1c Add error on real to non-real output pins (#2690). 2020-12-13 13:33:48 -05:00
Wilson Snyder 5898c22b3b Internals: Cleanup variables for pin interconnection 2020-12-13 13:22:42 -05:00
Wilson Snyder e2e3cc8463 Better error on inside on unpacked, queues, etc (#2566) 2020-12-12 21:20:42 -05:00
Wilson Snyder 517fdb7587 Support queue of arrays 2020-12-12 19:19:32 -05:00
Wilson Snyder a5fa468343 Fix cast from packed structs, broke with $cast (#2684) 2020-12-10 18:36:06 -05:00
Wilson Snyder af0e535015 Internals: Remove Xnor node type.
Convert to Not(Xor(x)) up front, to help code coverage and optimize out extra nots sooner.
2020-12-10 00:04:10 -05:00
Wilson Snyder 7d05be802d Misc internal coverage hole and related bug fixes 2020-12-09 19:18:12 -05:00
Wilson Snyder 8e06b1e925 Misc internal coverage cleanups 2020-12-07 23:15:29 -05:00
Krzysztof Bieganski cf7ea06b5d
Support randomize() class method and rand 2020-12-07 17:55:22 -05:00
Wilson Snyder cd248f6bd7 Internals: Make consistent left/right/lo/hi accessors to ranges.
Change order of Range to store always left:right.
XML output changes to now show left:right (previously info was lost), no other change intended.
2020-12-06 21:13:56 -05:00
Wilson Snyder b32d530000 Error message cleanup 2020-12-06 20:33:08 -05:00
Wilson Snyder 74ef35d3b3 Support $cast and new CASTCONST warning. 2020-12-05 22:58:36 -05:00
Wilson Snyder 8b8ebb0e43 Internals: Use restorer. No functional change. 2020-12-05 22:21:30 -05:00
Wilson Snyder 9c2785b49b Internals: Swap lhs/rhs $cast args. 2020-12-05 17:11:00 -05:00
Wilson Snyder 1e69167191 Internals: Move function in V3Width. No functional change. 2020-12-02 18:51:29 -05:00
Wilson Snyder a54ac52a35 Internals: Use 'Bit' where mean 2-state type. No functional change. 2020-11-29 08:23:36 -05:00
Wilson Snyder 9a9931fb9d Support complex function arguments. 2020-11-28 13:46:14 -05:00
Wilson Snyder 30686d8550 Support passing of objects to functions 2020-11-28 12:43:24 -05:00
Wilson Snyder 05f3fd7c6e Fix class new with math. 2020-11-28 12:26:44 -05:00
Wilson Snyder 1a92a44c7d Internals: Assert on misexpected 'new'. 2020-11-26 09:38:47 -05:00
Wilson Snyder 114ab1378f Internals: Track class package on membersels 2020-11-24 23:36:09 -05:00
Wilson Snyder e1c45440fc Internals: Rename packagep(). No functional change. 2020-11-24 21:56:03 -05:00
Wilson Snyder b0cb43b2f2 Fix not iterating some extended classes depending on declaration order. 2020-11-24 21:41:32 -05:00
Wilson Snyder e85a2e860e Support 'with item.index'. 2020-11-23 23:18:58 -05:00
Wilson Snyder b684995292 Support $random and $urandom seeds. 2020-11-19 21:32:33 -05:00
Yutetsu TAKATSUKASA 0102efd4ea
Support unpacked array in DPI-C (#2648)
* Add tests for unpacked array in DPI-C

* Add more generic parameter generator to AstNodes

* Supports multi dimensional array in DPI ( DPI argmuments <=> Verilator internal type conversion)

consider typedef in V3Task

fix export test

fix inout for scalar

support export func of time

* V3Premit does not show an error for wide words nor ArraySel

* Unnecessary pack func for unapcked array does not appear anymore

* Support unpacked array in runtime header

- Add an overload for lvalue VL_CVT_PACK_STR_NN
- Allow conversion from void *

* touch up tests for codacy advices

* resolve free functions. no functional change intended.
2020-11-19 22:02:58 +09:00
Wilson Snyder b6ded59c2b Internals: Use and enforce class final for ~5% performance boost. 2020-11-18 21:32:16 -05:00
Wilson Snyder c0888c1b0f Internals: Use newline instead of endl to avoid unneeded flush. 2020-11-18 21:03:23 -05:00
Wilson Snyder e6f7510895 Add check for rand_mode/constraint_mode. 2020-11-17 22:14:18 -05:00
Wilson Snyder 2f718b9ea0 Show IEEE reference in array port message, plus internal cleanups. 2020-11-17 21:10:50 -05:00
Wilson Snyder 1b0a48ea02 Internals: Use C++11 = default where obvious. No functional change intended. 2020-11-16 19:56:16 -05:00
Wilson Snyder 79d33bf1ee Use C++11 for loops, from clang-migrate. No functional change intended 2020-11-10 22:10:38 -05:00
Wilson Snyder 44eb362a18 clang-tidy cleanups. No functional change intended. 2020-11-10 21:40:14 -05:00
Wilson Snyder 6965e138aa Add clearer unsupported message for inside on array (#2566) 2020-11-08 23:26:58 -05:00
Wilson Snyder d78941885b Fix cast width propagation (#2597). 2020-11-08 19:07:33 -05:00
Wilson Snyder 6e7b07c794 Internals: Prep for #2597. No functional change intended 2020-11-08 18:58:31 -05:00
Wilson Snyder 152689776d Report error on typedef referencing self (#2539). 2020-11-07 15:41:37 -05:00
Wilson Snyder 778f133118 Fix dynamic new with init argument (#2325). 2020-11-07 14:28:05 -05:00
Wilson Snyder ff5465308b Internals: Tree dump DEFAULT pattern. No functional change. 2020-11-07 11:56:24 -05:00
Wilson Snyder 2a24bb4759 Fix queue poping wrong value when otherwise unused (#2512). 2020-11-07 10:37:55 -05:00
Krzysztof Bieganski 7c4259bc0a
Support static methods and typedefs in classes (#2615) 2020-11-06 19:51:21 -05:00
Wilson Snyder 2aedc91151 Support queue and associative array 'with' statements. (#2616) 2020-11-01 10:56:07 -05:00
Wilson Snyder c1e8337fc1 Support pattern assignment to dynamic arrays. 2020-11-01 10:18:32 -05:00
Wilson Snyder 726e78fdda Add 'with' syntax checks. 2020-10-31 10:33:36 -04:00
Wilson Snyder 085e8454b8 Support 'with' into elaboration (only). 2020-10-31 10:00:55 -04:00
Wilson Snyder 51b0963e61 Internals: Favor const for map keys. No functional change intended. 2020-10-30 18:00:40 -04:00
Wilson Snyder d44426b3f3 clang-format. No functional change. 2020-10-27 20:33:45 -04:00
Wilson Snyder 95d1272269 Support associative array pattern assignments and defaults. 2020-10-25 21:05:22 -04:00
Wilson Snyder 835905bdae Convert cast tasks to assertions 2020-10-24 20:30:52 -04:00
Wilson Snyder 4cec3ff2a0 Fix WIDTH warnings on comparisons with nullptr (#2602). 2020-10-22 17:27:23 -04:00
Wilson Snyder 25593c0ee2 Fix capitalization 2020-10-22 17:13:42 -04:00
Wilson Snyder 5d3dd52f13 Support queue slicing (#2326). 2020-10-18 13:23:39 -04:00
Wilson Snyder ec36d0d772 Internals: When resolving assignments pass dtype to children. 2020-10-18 12:30:33 -04:00
Wilson Snyder 4576644591 Prep for future queue slicing. 2020-10-17 21:09:10 -04:00
Wilson Snyder d8df216a8d Fix emit indent of VL_TO_STRING 2020-10-17 20:05:21 -04:00
Wilson Snyder 964dcd5b7c Tests: Add additional array method tests and error 2020-10-17 19:23:27 -04:00
Wilson Snyder f62c070d06 Internals: Concat strings only when final; prep for queues. 2020-10-17 18:56:38 -04:00
Wilson Snyder 6430743b6f Fix method calls to package class functions (#2565). [Peter Monsson] 2020-09-22 09:09:10 -04:00
Wilson Snyder 0c49cca527 Fix $urandom_range passed variable (#2563). 2020-09-22 08:44:51 -04:00
Peter Monsson d0819f156f
Add support for |=> inside properties (#1292). 2020-09-10 06:49:04 -04:00
Wilson Snyder 30f3774134 Support const object new() assignments. 2020-09-07 17:26:53 -04:00
Wilson Snyder 1899a875a4 Internals: Create VAccess class. No functional change intended. 2020-09-07 17:09:25 -04:00
Wilson Snyder ba5779c69e Fix queues as class members (#2525). 2020-08-29 12:56:43 -04:00
Wilson Snyder bed3101dfc Internals: Use VL_RESTORER class to save/restore vars. No functional change intended. 2020-08-24 21:13:28 -04:00
Wilson Snyder 917d3b0fb3 Support virtual class 2020-08-23 20:27:25 -04:00
Wilson Snyder 20206b1e2e Support simple class extends. 2020-08-23 19:37:56 -04:00
Wilson Snyder 132cc1d068 Parser: Move timing control unsupported message 2020-08-23 08:56:35 -04:00
Wilson Snyder f4a72946eb Support $urandom, $urandom_range without stability. 2020-08-23 08:42:50 -04:00
Wilson Snyder 4e6d2cfe38 Fix class constructor error on assignments to const. 2020-08-22 22:44:00 -04:00
Wilson Snyder 8455ee7091 Optimize one-statement fork/join into begin 2020-08-22 20:04:02 -04:00
Yutetsu TAKATSUKASA f632ea500c
Fix slice of unpacked array calculation (Issue #2506) (#2507)
Fixes Issue #2506 by shifting index as ArraySel does
2020-08-22 15:23:26 +09:00
Wilson Snyder 6013b54f7b clang-tidy cleanups. No functional change intended. 2020-08-16 14:55:46 -04:00
Wilson Snyder ac04e85a1c C++11: More range for. No functional change intended. 2020-08-16 12:54:32 -04:00
Wilson Snyder 78aee6f4e7 C++11: Use sized enums (+4% performance). 2020-08-16 12:05:35 -04:00
Wilson Snyder ee9d6dd63f C++11: Favor auto, range for. No functional change intended. 2020-08-16 11:44:06 -04:00
Wilson Snyder 72d2cff0a1 C++11: Use member declaration initalizations. No functional change intended. 2020-08-16 11:44:06 -04:00
Wilson Snyder 042d3eed23 C++11: Use override where possible. No functional change. 2020-08-16 11:44:05 -04:00
Wilson Snyder c0127599df C++11: Use nullptr. No functional change. 2020-08-16 11:44:05 -04:00
Wilson Snyder 7c54a451a9 C++11: Remove pre-c11 VL_OVERRIDE etc. No functional change. 2020-08-16 11:44:05 -04:00
Peter Monsson 4a5e4b04f3
Support $rose and $fell. (#2148) (#2501) 2020-08-14 07:37:10 -04:00
Wilson Snyder 20c906261b Fix casting non-self-determined subexpressions (#2493). 2020-08-09 20:59:06 -04:00
Wilson Snyder 98cd925fda Fix non-32 bit conversion to float (#2495). 2020-08-06 21:56:43 -04:00
Peter Monsson 1280070abb
Support $stable (#2488) 2020-07-28 18:26:24 -04:00
Wilson Snyder 50c28fa9d3 Parser: Move 'pure virtual' and 'extern' unsupported messages down out of parser. 2020-07-02 08:24:50 -04:00
Wilson Snyder 4d5e448664 Parser: Move member qualifier unsupporteds out of parser. 2020-07-01 07:31:53 -04:00
Wilson Snyder af197f2ceb Parser: Move 'virtual class' block unsupported messages down out of parser 2020-06-29 21:03:14 -04:00
Wilson Snyder ad55564905 Parser: Move disable fork and wait fork down into elaborate stage 2020-06-29 20:22:39 -04:00
Wilson Snyder 6de78d58fa Add new UNSUPPORTED error code to replace most previous Unsupported: messages. 2020-06-09 19:20:16 -04:00
Wilson Snyder d42f9c095b Delay parsing of associative arrays until dtypes known. 2020-06-09 07:13:40 -04:00
Wilson Snyder 47f040a5fd Internals: Do data type elaboration always as child node, before movement to symbol table. 2020-06-08 06:47:18 -04:00
Wilson Snyder 1eaec2aa8a Support --bbox-unsup of $cast 2020-06-06 09:30:11 -04:00