rtl:utils:gen_buf: add handle for DP=0

Signed-off-by: liangkangnan <liangkangnan@163.com>
pull/4/head
liangkangnan 2021-09-01 14:12:21 +08:00
parent ae3ff5a211
commit 574708bd89
1 changed files with 6 additions and 2 deletions

View File

@ -41,6 +41,10 @@ module gen_ticks_sync #(
end
endgenerate
assign dout = sync_dat[DP-1];
if (DP > 0) begin: dp_gt_0
assign dout = sync_dat[DP-1];
end else begin: dp_eq_0
assign dout = din;
end
endmodule