Commit Graph

5651 Commits

Author SHA1 Message Date
Wilson Snyder b2e61425d6 Fix const initial assignments. 2022-11-11 17:45:34 -05:00
Wilson Snyder 9d7c4d9af3 Fix wait 0. 2022-11-11 17:18:59 -05:00
Wilson Snyder 0c75d4eaca Internals: Fix constructor style. 2022-11-10 22:58:27 -05:00
Wilson Snyder 528a73a492 Fix instability after disable iff error. 2022-11-10 22:09:24 -05:00
Wilson Snyder fbf2e59c85 Fix loss of V3Simulate on expression statements. 2022-11-10 20:49:11 -05:00
Wilson Snyder 16586d1d37 Fix tracing parameters overridden with -G (#3723). 2022-11-10 20:30:10 -05:00
Ryszard Rozak 441b5da5ce
Fix 'with' clause handling in functions (#3739) 2022-11-10 18:08:15 -05:00
Kamil Rakoczy 207bc2b18a Fix comment annotation
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2022-11-10 13:36:14 +00:00
Wilson Snyder e64295e92b Fix missing UNUSED warnings with --coverage (#3736). 2022-11-09 21:45:14 -05:00
Ryszard Rozak cbf9cc8e5f
Fix return in constructors (#3734) 2022-11-09 06:32:22 -05:00
Ryszard Rozak a29d9469da
Fix jump handling in do while loops (#3731) 2022-11-08 20:01:08 -05:00
Geza Lore 2a3eabff73 Various Dfg performance improvements 2022-11-06 15:54:51 +00:00
Geza Lore 454efbe3fc Dfg: Use a worklist driven algorithm for unused vertex removal
This improves verilation speed slightly.
2022-11-06 14:13:42 +00:00
Geza Lore fb9ec03c3f DfgPeephole: Use a work list driven algorithm for speed
Replace the 'run to fixed point' algorithm with a work list driven
approach. Instead of marking the graph as changed, we explicitly add
vertices to the work list, to be visited, when a vertex is changed. This
improves both memory locality (as the work list is processed in last in
first out order), and removed unnecessary visitations when only a few
nodes changes.
2022-11-05 20:31:09 +00:00
Wilson Snyder 21926eeb6b Tests: Improve some coverage 2022-11-05 11:40:34 -04:00
Geza Lore 6ae6b16223 V3Const: Fix folding of LogAnd with non-bool operands
Folding an AstLogAnd with a non-zero constant operand used to coerce the
type of the other operand, yielding an ill-typed node that DFG was then
unhappy about. Add a RedOr instead if the width of the replacement
operand is greater than zero.

Fixes #3726
2022-11-05 13:36:21 +00:00
Wilson Snyder 167f4ebbd4 Commentary: Changes update 2022-11-05 09:32:41 -04:00
Kamil Rakoczy d6126c4b32
Remove --no-threads; require --threads 1 for single threaded (#3703). 2022-11-05 08:47:34 -04:00
Ryszard Rozak 8d61cea366
Fix return type of $countbits functions to int (#3725) 2022-11-04 08:58:17 -04: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
Wilson Snyder cf4c00e3b4 Internals: if assertion should be VL_UNLIKELY 2022-11-02 20:11:25 -04:00
Ryszard Rozak bac98df46b
Support named properties (#3667) 2022-11-01 18:53:47 -04:00
Wilson Snyder 0b0b642241 devel release 2022-10-29 17:54:12 -04:00
Wilson Snyder 52d29d238c Version bump 2022-10-29 17:45:54 -04:00
Geza Lore 0675510eb9 DFG: Fix attempted evaluation of constants wider than 32 bits
Fixes #3718
2022-10-28 17:14:19 +01:00
Geza Lore 99791ac8b3 Reduce verbosity of DFG debug 2022-10-28 16:35:53 +01:00
Wilson Snyder ee26378394 Tests: Fix instability (#3717) 2022-10-28 10:32:52 -04:00
Geza Lore 54c4351c39 V3Const: Do not introduce redundant AstExtend
Fixes #3716
2022-10-28 14:54:00 +01:00
Geza Lore e504e9aced Optimize clocked processes to comb when referencing const variables
In V3Active, we try hard to turn `always @(a or b or c)` into an
`always_comb` if the only variables read in the block are also in the
sensitivity list. In addition, also allow this optimization when reading
variables that are not in the sensitivity list, but are known to be
constant/never changing after initialization. In particular lookup
tables introduced by V3Table are covered by this. This can have a
significant impact on designs that use the `always @(a or b or c)` style
for combinational logic.
2022-10-28 14:37:30 +01: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
Wilson Snyder 5c658f8cd5 Fix width mismatch on inside operator (#3714). 2022-10-28 06:38:49 -04:00
Wilson Snyder 0ed7aaeabd Update include/gtkwave/fstapi.c from upstream. 2022-10-27 21:37:09 -04:00
Wilson Snyder 5f9b0929b4 Commentary: Changes update 2022-10-27 21:35:09 -04:00
Geza Lore 65290afe0a Fix VString::endsWith when suffix is longer than input string. 2022-10-27 18:38:44 +01:00
Kamil Rakoczy ed93a111c2
Fix deadlock in ``timeprecision`` when using systemC (#3707) 2022-10-26 04:50:28 -07:00
Wilson Snyder 3487701b04 Tests: Cover some previously uncovered warnings 2022-10-22 16:03:42 -04:00
Wilson Snyder d33a3d09f7 Tests: Fix bison-dependent .out 2022-10-22 14:35:36 -04:00
Wilson Snyder 0716a28816 Tests: Check for v3warn/v3error without a test 2022-10-22 13:46:49 -04:00
Wilson Snyder 8e1901da10 Tests: Cover some previously uncovered warnings 2022-10-22 13:45:48 -04:00
Wilson Snyder ecfa385f13 Test/cleanup endtable without table 2022-10-22 12:30:44 -04:00
Wilson Snyder 63df87e220 Commentary 2022-10-22 12:18:28 -04:00
Wilson Snyder 495d52d30f Test and fix extra end_keywords 2022-10-22 12:17:56 -04:00
Wilson Snyder 2df886b2b0 Tests: Check std:: package for mailbox/process/semaphore 2022-10-22 10:58:10 -04: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
Wilson Snyder 4154584c4b Commentary: Changes update 2022-10-21 20:04:07 -04:00
Wilson Snyder a57a3579c0 Fix false LATCH warning on 'unique if' (#3088). 2022-10-21 19:10:06 -04:00
Wilson Snyder 203993b018 Internals: Fix constructor style. 2022-10-21 19:03:40 -04:00
Wilson Snyder 347e9b4ec8 Fix cell assigning integer array parameters (#3299). 2022-10-21 18:26:39 -04:00
Wilson Snyder 9d02082801 Internals: Avoid VM_COVERAGE ifdef in library to get closer to libverilated.a 2022-10-21 17:09:06 -04:00
Krzysztof Bieganski 785c51dd0b
Fix emitting timing debug info with `--protect-ids` (#3689) (#3701) 2022-10-21 16:56:44 -04:00