Files
verilator/test_regress/t/t_dfg_inline_const_clock.v
T
Geza Lore b4a0ca8ba6 Optimize Ast read references in Dfg directly (#7354)
Introduce a new DfgAstRd vertex, which holds an AstNodeExpr that is a
reference to a variable. This enables tracking all read references in
Dfg, which both enables more optimization, and allows inlining of
expressions in place of the reference more intelligently (e.g, when the
expression is only used once, and is not in a loop). This can get rid of
20-30% of temporary variables introduced in Dfg in some designs. Note
V3Gate later got rid of a lot of those, this is a step towards making
V3Gate redundant. The more intelligent expression inlining is worth ~10%
runtime speed on some designs.
2026-04-01 10:52:56 +01:00

26 lines
533 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module t;
bit clk = 1'b0;
always #5 clk = ~clk;
initial begin
#300;
$write("*-* All Finished *-*\n");
$finish;
end
// Complicated way to write constant 0 that only Dfg can decipher
wire [1:0] constant = 2'b0 ^ (({2{clk}} & ~{2{clk}}));
always @(posedge constant[0]) begin
$stop;
end
endmodule