Commit Graph

6219 Commits

Author SHA1 Message Date
Wilson Snyder 04f68cbd99 Internals: Spacing 2022-11-13 21:58:18 -05:00
Wilson Snyder 8c6d1e53ca Internals: Fix some 'p' names, and make new base class for VlDeleter. No functional change intended. 2022-11-13 17:40:50 -05:00
Wilson Snyder c6ecd60993 Support pre_randomize and post_randomize. 2022-11-13 11:59:40 -05:00
Wilson Snyder ee26dddfa1 Internals: Fix constructor style. 2022-11-13 11:23:57 -05:00
github action d1658b9e82 Apply 'make format' 2022-11-13 14:27:37 +00:00
Wilson Snyder 818347f99b Internals: Fix some unnecessary member paddings. No functional change intended. 2022-11-13 09:26:46 -05:00
Kritik Bhimani 201419c646
Fix MSVC compiler errors (#3742) (#3746) 2022-11-13 08:35:06 -05:00
Wilson Snyder d25834e57b Add ENUMVALUE warning when value misused for enum (#726). 2022-11-12 20:11:05 -05:00
Wilson Snyder 4f50073feb Internals: Fix constructor style. 2022-11-12 19:51:03 -05:00
Wilson Snyder 218dd4322b Fix C++11 warnings 2022-11-12 16:03:13 -05:00
Geza Lore eaf09ba0e7 Dfg: resolve multi-driven signal ranges
In order to avoid unexpected breakage on multi-driven variables, we
resolve in DFG construction by using only the first driver encountered.
Also issues the MULTIDRIVEN error for these signals.
2022-11-12 20:34:51 +00:00
github action 8291d8bcc1 Apply 'make format' 2022-11-12 17:10:41 +00:00
Wilson Snyder 0a045a7bf6 Change ENDLABEL from warning into an error. 2022-11-12 12:09:48 -05:00
Geza Lore dbcaad99c5 Dfg: Fix crash on additional driver from non-DFG logic
Ensure variables written by non-DFG code are kept

Fixes #3740
2022-11-12 11:55:49 +00:00
Wilson Snyder 6736e92cdb Internals: Fix some ugly line breaks. No functional change. 2022-11-11 22:33:17 -05:00
Wilson Snyder a427860825 Support randcase. 2022-11-11 21:53:05 -05:00
William D. Jones 41d2ebe288
Fix CONTEXT compile error on mingw64 (#3741). 2022-11-11 21:43:10 -05:00
Wilson Snyder 227e61f891 Fix comparing ranged slices of unpacked arrays. 2022-11-11 18:01:30 -05:00
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