3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

check: Also check for conflicts with constant drivers

This commit is contained in:
Jannis Harder 2023-06-23 18:07:28 +02:00
parent f9257d3192
commit a07f8ac38a
2 changed files with 71 additions and 11 deletions

View file

@ -0,0 +1,51 @@
read_verilog <<EOT
module top(input A, output Y);
assign A = 1;
assign Y = A;
endmodule
EOT
hierarchy -top top; proc
logger -expect warning "Drivers conflicting with a constant" 1
logger -expect log "Found and reported 1 problems." 1
check
logger -check-expected
design -reset
read_verilog <<EOT
module top(input A, output Y);
buffer some_buffer(A, Y);
assign Y = 1;
endmodule
module buffer(input A, output Y);
assign Y = A;
endmodule
EOT
hierarchy -top top; proc
logger -expect warning "Drivers conflicting with a constant" 1
logger -expect log "Found and reported 1 problems." 1
check
logger -check-expected
design -reset
read_verilog <<EOT
module top(input clk, input A, output Y);
reg Q;
always @(posedge clk) Q <= A;
assign Q = 1;
assign Y = A;
endmodule
EOT
hierarchy -top top
logger -expect warning "Drivers conflicting with a constant" 1
logger -expect log "Found and reported 1 problems." 1
check
logger -check-expected