Kefa Chen
5f1dc73a1b
Support public packed struct / union ( #860 ) ( #4878 )
2024-03-03 10:23:04 -05:00
Yutetsu TAKATSUKASA
da9521a351
Internals: Add --debug-width option for developers to check width consistency ( #4923 )
2024-03-02 08:57:26 -05:00
Yutetsu TAKATSUKASA
65b632a7dd
Improve assertion for unique case ( #4892 )
...
- Use parallel_case, unique, and unique0 in error message
- Distinguish multiple match and no match
- Show the case value that triggers the assertion
2024-02-13 21:53:32 +09:00
Szymon Gizler
d667b73e8d
Add --json-only and related JSON dumping ( #4715 ) ( #4831 ).
2024-02-09 17:50:09 -05:00
Wilson Snyder
715dce546f
Fix debug infinite loop when bad coverage pointers
2024-02-07 19:57:02 -05:00
Wilson Snyder
d6f8ccd20b
Add `unroll_disable` and `unroll_full` loop control metacomments ( #3260 ).
2024-01-26 07:49:07 -05:00
Wilson Snyder
21e85f87bc
Fix compilation error on multi-inherited interface class usage ( #4819 ).
2024-01-23 19:36:11 -05:00
Wilson Snyder
e76f29e5ba
Copyright year update
2024-01-01 03:19:59 -05:00
Ryszard Rozak
a811f2e17d
Support inside operator on unpacked arrays and queues ( #4751 )
2023-12-12 09:20:22 +01:00
Wilson Snyder
feae9ca4aa
Internals: Use astgen for cross-node pointers. No functional change intended. ( #4727 )
2023-11-30 19:58:16 -05:00
Krzysztof Boroński
cc982ec7fe
Fix range access to fields under classes that depend on parameter resolution ( #4681 )
...
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-11-15 14:24:41 +01:00
Wilson Snyder
c8063e5732
Internals: Misc cleanups in V3Graph and V3Dead. No functional change.
2023-11-12 22:08:08 -05:00
Wilson Snyder
9d7f5bdc26
Internals: Dump CFunc entry points.
2023-11-11 20:34:51 -05:00
Wilson Snyder
99dbd23f1b
Support passing constraints to --xml-only output (still otherwise unsupported) ( #4683 )
2023-11-11 20:20:37 -05:00
Wilson Snyder
dc10118d3b
Fix C++20 compilation errors ( #4670 )
2023-11-06 07:13:31 -05:00
Geza Lore
3c144ada53
Delete AstNode user5 ( #4638 )
...
This saves about 5% memory. V3AstUserAllocator is appropriate for most use
cases, performance is marginally up as we are mostly D-cache bound on
large designs.
2023-10-29 01:12:27 +01:00
Geza Lore
d60f180f43
Avoid double traversal of maps
...
The typical find/if-not-exists-insert pattern can be achieved with 1
lookup instead of 2 using emplace with a sentinel value. Also maps value
initialize their values when inserted with the [] operator, this is
defined and so there is no need to explicitly insert zeroes for integer
values.
2023-10-28 13:41:43 +01:00
Chih-Mao Chen
98252634fc
Include systemc instead of systemc.h in model header files ( #4622 ) ( #4623 )
...
This may require that SystemC programs add:
using namespace sc_core;
using namespace sc_dt;
2023-10-26 14:36:18 -04:00
Krzysztof Boroński
a87fb57656
Allow assigning events ( #4403 )
...
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-10-26 16:38:47 +02:00
Geza Lore
34708bbba1
Respect --dump-tree-addrids in tree dumps
2023-10-25 18:17:26 +01:00
Marlon James
cf6e362972
Support VPI variables of real and string data types ( #4594 )
2023-10-24 20:46:20 -04:00
Krzysztof Bieganski
7b12f6a1dd
Support NBAs in non-inlined functions/tasks ( #4496 ) ( #4572 )
2023-10-20 20:01:45 -04:00
Wilson Snyder
b7233d063f
Internals: Fix same() called outside of sameTree ( #4561 ).
2023-10-18 17:36:21 -04:00
Wilson Snyder
b5828a7ce9
Fix header order botched by clang-format in recent commit.
2023-10-18 06:37:46 -04:00
github action
770cd24f27
Apply 'make format'
2023-10-18 02:50:27 +00:00
Wilson Snyder
431bb1ed16
Support compiling Verilator with gcc/clang precompiled headers ( #4579 )
2023-10-17 22:49:28 -04:00
Krzysztof Bieganski
99ea16d7fd
Fix dynamic triggers for named events ( #4571 )
2023-10-16 11:06:41 -04:00
Aleksander Kiryk
ad3bcbb1bb
Support `disable fork` ( #4125 ) ( #4569 )
2023-10-16 14:02:29 +02:00
Yutetsu TAKATSUKASA
25dde58297
Internals: Use VN_AS instead of static_cast. Fix some wrong types. ( #4561 )
2023-10-16 05:17:52 -04:00
Anthony Donlon
bba3487dc4
Internals: Fix hash and comparison function for AstBasicDType ( #4564 )
2023-10-15 15:15:46 -04:00
Wilson Snyder
684aba0e90
Fix purity calculation during V3Const simplifying Ast
2023-10-15 06:25:42 -04:00
Anthony Donlon
7ce0bd1181
Fix broken link error for enum references ( #4551 )
2023-10-10 17:55:40 -04:00
Mariusz Glebocki
a5ee8b39ef
Internals: Remove use of V3Width code from V3AstNodes ( #4537 ). No functional change intended.
...
`getCommonClassTypep` and its helper code has been moved to AstNode
class. This is a lot better place for this functionality. Moreover, it
allowed to get rid of the dependency on V3Width from generic AST-related
code.
2023-10-09 17:43:27 -04:00
Ryszard Rozak
44e7d2ebe6
Internals: rename VPurity class and related functions. No functional change ( #4523 )
2023-09-29 12:23:51 +02:00
Mariusz Glebocki
28bd7e5b19
Rework multithreading handling to separate by code units that use/never use it. ( #4228 )
2023-09-24 22:12:23 -04:00
Ryszard Rozak
4636e9cffb
Fix passing arguments by reference ( #3385 partial) ( #4489 )
2023-09-20 07:33:11 -04:00
Wilson Snyder
24ff3155ae
Support randc ( #4349 ).
2023-09-18 21:17:21 -04:00
Ryszard Rozak
47b3f464a9
Disable conversion of impure logical expressions to bitwise expressions ( #487 partial) ( #4437 )
2023-09-18 09:21:30 -04:00
Wilson Snyder
761adf1cf0
Internals: Add cloneTreePure to prepare for side effect check.
...
Use cloneTreePure when what is being cloned must be side-effect free.
Use cloneTree when safe to contain side effects (e.g. cloning module).
2023-09-16 22:50:54 -04:00
Wilson Snyder
c52ba28dd0
Tests: Fix commentary to unify issue references.
2023-09-15 18:12:11 -04:00
Ryszard Rozak
b66c4153b1
Compute purity of AstCMethodHard ( #4460 )
2023-09-11 13:06:15 +02:00
Krzysztof Bieganski
fb1fc46b06
Internals: Rework self pointers ( #4396 )
2023-09-08 07:34:35 -04:00
Ryszard Rozak
91227d26bb
Internals: Rename pure to dpiPure. No functional change. ( #4461 )
2023-09-08 08:51:19 +02:00
Ryszard Rozak
2d9bc73709
Fix dtype of condition operation on class objects ( #4345 ) ( #4352 )
2023-08-07 05:54:30 -04:00
Krzysztof Bieganski
9caa79a7ea
Internals: Remove the name field from `AstVarRef` ( #4395 )
2023-08-03 02:52:52 -04:00
Wilson Snyder
f94c1b32e5
Internals: Make V3MemberMap to remove member cache ( #4350 )
2023-07-08 12:40:27 -04:00
Wilson Snyder
ff4923cf67
Internals: Make V3MemberMap towards removing member cache ( #4350 )
2023-07-08 12:27:50 -04:00
Ryszard Rozak
242f661644
Fix selects of static members ( #4326 )
2023-06-30 09:12:22 +02:00
Ryszard Rozak
b517fb5ee3
Support some stream operations on queues ( #4292 )
2023-06-13 22:46:42 -04:00
github action
a7b0551d23
Apply 'make format'
2023-06-03 14:11:23 +00:00
John Wehle
dc34968fe7
Add class specific same methods for AstVarScope, AstVar, and AstScope ( #4203 ) ( #4250 )
2023-06-03 10:07:39 -04:00
Aleksander Kiryk
db7935faf3
Add std::process class ( #4212 )
2023-06-01 10:02:08 -04:00
Wilson Snyder
4818130e4f
Internals: Remove dead code, addBeforeStmt
2023-05-20 22:37:28 -04:00
Ryszard Rozak
2ce7a348df
Fix references to members of parameterized base classes ( #4196 )
2023-05-15 19:50:04 -04:00
Wilson Snyder
0606a29f13
Fix arrays of unpacked structs ( #4173 ).
2023-05-06 21:41:17 -04:00
Wilson Snyder
584f8cc9e7
Internal: With --xml-only support --debug-exit-uvm
2023-05-05 13:47:34 -04:00
Geza Lore
0e769d42a1
Optimize trigger evaluation
...
Pack the elements of VlTriggerVec as dense bits (instead of a 1 byte
bool per bit), and check whether they are set on a word granularity.
This effectively transforms conditions of the form `if (trig.at(0) |
trig.at(2) | trig.at(64))` into `if (trig.word(0) & 0x5 | trig.word(1) &
0x1)`. This improves OpenTitan ST by about 1%, worth more on some other
designs.
2023-04-24 09:09:36 +02:00
Kamil Rakoczy
65a484e00b
Internal: Update clang_check_annotations conditions ( #4134 )
2023-04-20 07:02:31 -04:00
Ryszard Rozak
f95ce886f1
Fix duplicating parameter class types ( #4115 )
2023-04-14 06:51:33 -04:00
Wilson Snyder
fff0eb5d88
Internals: Use standard 'result' name for return variable. No functional change.
2023-04-08 22:11:28 -04:00
Wilson Snyder
8caf9be3e6
Internals: Favor {} constructor syntax. No functional change intended.
2023-04-06 21:04:26 -04:00
Wilson Snyder
69121633cf
Support class srandom and class random stability.
2023-04-01 10:50:27 -04:00
Iztok Jeras
2aa6a229ca
Change range order warning from LITENDIAN to ASCRANGE ( #4010 )
2023-03-20 20:44:11 -04:00
Wilson Snyder
82e653a739
Internals: Avoid emit inheritance in V3EmitCBase. No functional change intended.
2023-03-18 12:23:17 -04:00
Wilson Snyder
4240c29f4b
Internals: Fix missing broken check
2023-03-16 21:14:49 -04:00
Kamil Rakoczy
bbf53bd5af
Add VL_MT_SAFE attribute to several functions. ( #3729 )
2023-03-16 19:48:56 -04:00
Ryszard Rozak
4e5bd361e0
Internal: Fix dumping of AstMethodCall ( #4021 )
2023-03-14 06:54:45 -04:00
Wilson Snyder
326a60d307
Add error on mixing .name and by-port instantiations.
2023-03-01 21:19:21 -05:00
Krzysztof Boroński
06661ab676
Disallow ++/-- over expressions with potential side effects ( #3976 ).
2023-02-28 15:21:58 -05:00
Wilson Snyder
15d0ec317d
Fix lint for non-integral types in packed structs.
2023-02-12 16:32:36 -05:00
Ryszard Rozak
072d76fe8e
Use VAR_BASE as attr type if a select's base is a ref ( #3943 )
...
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2023-02-07 15:10:19 +01:00
Wilson Snyder
6a7dfb7696
Fix pattern assignment to unpacked structs ( #3510 ).
2023-01-29 16:50:10 -05:00
Wilson Snyder
8d2be855f5
Internals: Parsing and tests for class interfaces
2023-01-28 16:30:47 -05:00
Wilson Snyder
f20997a2f0
Support global clocking and $global_clock.
2023-01-28 12:31:52 -05:00
Wilson Snyder
93517b8378
Support unpacked unions.
2023-01-27 22:41:12 -05:00
Wilson Snyder
b24d7c83d3
Copyright year update
2023-01-01 10:18:39 -05:00
Wilson Snyder
c0499da28b
Spelling fixes
2022-12-23 11:32:38 -05:00
Wilson Snyder
3ccb2e0f2d
Fix initiation of function variables ( #3815 ).
2022-12-23 10:51:52 -05:00
Krzysztof Bieganski
bb44d4e4f2
Support clocking blocks ( #3674 )
2022-12-23 07:34:49 -05:00
Aleksander Kiryk
c2b09e35f8
Support unpacked structs ( #3802 )
2022-12-20 19:22:42 -05:00
Wilson Snyder
87135d0b2d
Internals: Fix missing const. No functional change.
2022-12-01 18:47:09 -05:00
Wilson Snyder
833780fac1
Internal: cppcheck fixes. No functional change intended.
2022-11-27 05:52:40 -05:00
Wilson Snyder
25f970eac2
Internals: Fix constructor style.
2022-11-20 15:06:49 -05:00
Geza Lore
3abb65d732
Strengthen AstNode types to AstNodeExpr
...
Declare every AstNode children and variables as AstNodeExpr where we
statically know this is the appropriate sub-type.
2022-11-20 19:31:28 +00:00
Wilson Snyder
f266b02bc7
Internals: Improve dtype small dump.
2022-11-19 13:23:28 -05:00
Geza Lore
65e08f4dbf
Make all expressions derive from AstNodeExpr ( #3721 ).
...
Apart from the representational changes below, this patch renames
AstNodeMath to AstNodeExpr, and AstCMath to AstCExpr.
Now every expression (i.e.: those AstNodes that represent a [possibly
void] value, with value being interpreted in a very general sense) has
AstNodeExpr as a super class. This necessitates the introduction of an
AstStmtExpr, which represents an expression in statement position, e.g :
'foo();' would be represented as AstStmtExpr(AstCCall(foo)). In exchange
we can get rid of isStatement() in AstNodeStmt, which now really always
represent a statement
Peak memory consumption and verilation speed are not measurably changed.
Partial step towards #3420
2022-11-03 16:02:16 +00:00
Geza Lore
ef2776034e
Adjust instruction count estimates for AstCMethodHard
...
The cost of an AstCMethodHard right now is generally unknown. However,
VlTriggerVec::at is used a lot in conditions, so we make an effort
to estimate this correctly via 2 changes:
- In general when an AstVarRef appears as the target of an
AstCMethodHard, we cost it as a simple address computation (an add)
- Check for VlTriggerVec::at explicitly when costing AstCMethodHard,
which is essentially a load.
This can have a significant effect when there are a lot of unique
triggers in the design.
2022-10-28 14:37:30 +01:00
Krzysztof Bieganski
fcf0d03cd4
Dynamic triggers for non-static contexts ( #3599 )
...
In non-static contexts like class objects or stack frames, the use of
global trigger evaluation is not feasible. The concept of dynamic
triggers allows for trigger evaluation in such cases. These triggers are
simply local variables, and coroutines are themselves responsible for
evaluating them. They await the global dynamic trigger scheduler object,
which is responsible for resuming them during the trigger evaluation
step in the 'act' eval region. Once the trigger is set, they await the
dynamic trigger scheduler once again, and then get resumed during the
resumption step in the 'act' eval region.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-10-22 14:05:39 +00:00
Arkadiusz Kozdra
627a144b83
Support access to constructs inside type parameters ( #3702 )
...
This changeset brings support for accesses like:
class Cls#(type TYPE1);
TYPE1::some_method();
endclass
It is done by delaying dot resolution on type parameters until they get
resolved by V3Param, and doing a more thorough reference skip.
2022-10-21 09:00:40 -04:00
Arkadiusz Kozdra
0e4da3b0bf
Support virtual interfaces ( #3654 )
2022-10-20 06:31:00 -04:00
Kamil Rakoczy
b6c116d4bf
Internals: Add VL_MT_SAFE annotations to const functions ( #3681 )
2022-10-18 17:07:09 -04:00
Krzysztof Bieganski
8a347248f5
Use `AstDelay` nodes for intra-assignment delays ( #3672 )
...
Also fix messy implementation of net delays.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-10-14 09:35:26 +02:00
Geza Lore
d8b5359fcb
Merge branch 'master' into develop-v5
2022-09-26 14:45:08 +01:00
Geza Lore
9a20a258f5
Omit AstNode::m_editCount in release build
...
This is only a debugging aid at this point, so compile out of the
release build. This reduces peak memory consumption by 4-5%. We still
keep the global counters to detect the tree have changed, to avoid
unnecessary dumps.
2022-09-25 08:57:33 +01:00
Geza Lore
95145038b4
Generate AstNode accessors via astgen
...
Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
2022-09-21 14:05:27 +01:00
Geza Lore
ce03293128
Generate AstNode accessors via astgen
...
Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
2022-09-21 13:56:03 +01:00
Geza Lore
af305bf280
Merge branch 'master' into develop-v5
2022-09-16 16:24:36 +01:00
Geza Lore
38a8d7fb2e
Remove redundant 'inline' keywords from definitions
...
Also add checks to t/t_dist_cppstyle
2022-09-16 15:52:25 +01:00
Geza Lore
0c70a0dcbf
Remove redundant 'virtual' keywords from overridden methods
...
'virtual' is redundant when 'override' is present, so keep only
'override'.
Add t/t_dist_cppstyle.pl to check for this.
2022-09-16 15:19:38 +01:00
Geza Lore
d16619fe86
astgen: Explicitly generate AstNode members
...
Generate boilerplate members of AstNode sub-types directly via astgen.
This is in preparation for generating additional members.
2022-09-16 11:18:20 +01:00