Skip to content

Commit 29df4d5

Browse files
committed
Quartus demands to split if conditions
1 parent 2499f3a commit 29df4d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cdc_strobe.sv

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ module cdc_strobe (
6565
// buffering strb1
6666
logic strb1_b = 1'b0;
6767
always @(posedge clk1 or posedge arst) begin
68-
if( arst || ~nrst1 ) begin
68+
if( arst ) begin
69+
strb1_b <= '0;
70+
end else if( ~nrst1 ) begin // Quartus demands to split these if conditions
6971
strb1_b <= '0;
7072
end else begin
7173
strb1_b <= strb1;
@@ -90,7 +92,9 @@ module cdc_strobe (
9092
// gray counter does not need a synchronizer
9193
logic [1:0][1:0] gc_b = '0;
9294
always @(posedge clk2 or posedge arst) begin
93-
if( arst || ~nrst2 ) begin
95+
if( arst ) begin
96+
gc_b[1:0] <= {2{gc_FP_ATTR[1:0]}};
97+
end else if( ~nrst2 ) begin // Quartus demands to split these if conditions
9498
gc_b[1:0] <= {2{gc_FP_ATTR[1:0]}};
9599
end else begin
96100
gc_b[1:0] <= {gc_b[0],gc_FP_ATTR[1:0]}; // shifting left

0 commit comments

Comments
 (0)