3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-02 08:10:46 +00:00

Merge commit

This commit is contained in:
akash 2024-03-29 19:30:48 -07:00
parent 632a70454c
commit 19dbde2891
27 changed files with 390 additions and 73 deletions

17
tests/various/check_2.ys Normal file
View file

@ -0,0 +1,17 @@
# just so slightly adjust the example from check.ys to induce a loop
design -reset
read -vlog2k <<EOF
module top(input clk, input a, input b, output [9:0] x);
wire [9:0] ripple;
reg [9:0] prev_ripple = 9'b0;
always @(posedge clk) prev_ripple <= ripple;
assign ripple = {ripple[8:1], a, ripple[0]} ^ prev_ripple;
assign x = ripple[9] + b;
endmodule
EOF
hierarchy -top top
prep
logger -expect warning "found logic loop in module top:" 1
logger -expect error "Found 1 problems in 'check -assert'" 1
check -assert