mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-23 05:15:30 +00:00
avoid erroring out when coarse-grain logic loops can be resolved by mapping to fine grain operators
This commit is contained in:
parent
b4dd638311
commit
3ff2c9affc
2 changed files with 24 additions and 0 deletions
23
tests/regression/fake_loop.sby
Normal file
23
tests/regression/fake_loop.sby
Normal file
|
@ -0,0 +1,23 @@
|
|||
[options]
|
||||
mode cover
|
||||
|
||||
[engines]
|
||||
smtbmc boolector
|
||||
|
||||
[script]
|
||||
read -formal fake_loop.sv
|
||||
hierarchy -top fake_loop
|
||||
proc
|
||||
|
||||
[file fake_loop.sv]
|
||||
module fake_loop(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:0], a} ^ prev_ripple; // only cyclic at the coarse-grain level
|
||||
assign x = ripple[9] + b;
|
||||
|
||||
always @(posedge clk) cover(ripple[9]);
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue