Skip to content

Commit

Permalink
[clkmgr] Deglitch shadow storage error for remaining clock domains
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Kurth <[email protected]>
  • Loading branch information
andreaskurth committed Sep 16, 2024
1 parent c3c13fa commit e7fc5a2
Showing 1 changed file with 84 additions and 12 deletions.
96 changes: 84 additions & 12 deletions hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,18 @@ module clkmgr_reg_top (
io_io_meas_ctrl_shadowed_we & io_io_meas_ctrl_shadowed_regwen;
// F[hi]: 9:0
logic async_io_meas_ctrl_shadowed_hi_err_update;
logic async_io_meas_ctrl_shadowed_hi_err_storage;
logic async_io_meas_ctrl_shadowed_hi_err_storage, deglitched_io_meas_ctrl_shadowed_hi_err_storage;

// flop storage error to filter combinational glitches before sending it across CDC
prim_flop #(
.Width(1),
.ResetValue('0)
) u_io_meas_ctrl_shadowed_hi_err_storage_deglitch (
.clk_i (clk_io_i),
.rst_ni(rst_io_ni),
.d_i (async_io_meas_ctrl_shadowed_hi_err_storage),
.q_o (deglitched_io_meas_ctrl_shadowed_hi_err_storage)
);

// storage error is persistent and can be sampled at any time
prim_flop_2sync #(
Expand All @@ -1297,11 +1308,12 @@ module clkmgr_reg_top (
) u_io_meas_ctrl_shadowed_hi_err_storage_sync (
.clk_i,
.rst_ni,
.d_i(async_io_meas_ctrl_shadowed_hi_err_storage),
.d_i(deglitched_io_meas_ctrl_shadowed_hi_err_storage),
.q_o(io_meas_ctrl_shadowed_hi_storage_err)
);

// update error is transient and must be immediately captured
// prim_pulse_sync flops update_err before sending it across CDC
prim_pulse_sync u_io_meas_ctrl_shadowed_hi_err_update_sync (
.clk_src_i(clk_io_i),
.rst_src_ni(rst_io_ni),
Expand Down Expand Up @@ -1347,7 +1359,18 @@ module clkmgr_reg_top (

// F[lo]: 19:10
logic async_io_meas_ctrl_shadowed_lo_err_update;
logic async_io_meas_ctrl_shadowed_lo_err_storage;
logic async_io_meas_ctrl_shadowed_lo_err_storage, deglitched_io_meas_ctrl_shadowed_lo_err_storage;

// flop storage error to filter combinational glitches before sending it across CDC
prim_flop #(
.Width(1),
.ResetValue('0)
) u_io_meas_ctrl_shadowed_lo_err_storage_deglitch (
.clk_i (clk_io_i),
.rst_ni(rst_io_ni),
.d_i (async_io_meas_ctrl_shadowed_lo_err_storage),
.q_o (deglitched_io_meas_ctrl_shadowed_lo_err_storage)
);

// storage error is persistent and can be sampled at any time
prim_flop_2sync #(
Expand All @@ -1356,11 +1379,12 @@ module clkmgr_reg_top (
) u_io_meas_ctrl_shadowed_lo_err_storage_sync (
.clk_i,
.rst_ni,
.d_i(async_io_meas_ctrl_shadowed_lo_err_storage),
.d_i(deglitched_io_meas_ctrl_shadowed_lo_err_storage),
.q_o(io_meas_ctrl_shadowed_lo_storage_err)
);

// update error is transient and must be immediately captured
// prim_pulse_sync flops update_err before sending it across CDC
prim_pulse_sync u_io_meas_ctrl_shadowed_lo_err_update_sync (
.clk_src_i(clk_io_i),
.rst_src_ni(rst_io_ni),
Expand Down Expand Up @@ -1446,7 +1470,18 @@ module clkmgr_reg_top (
io_div2_io_div2_meas_ctrl_shadowed_we & io_div2_io_div2_meas_ctrl_shadowed_regwen;
// F[hi]: 8:0
logic async_io_div2_meas_ctrl_shadowed_hi_err_update;
logic async_io_div2_meas_ctrl_shadowed_hi_err_storage;
logic async_io_div2_meas_ctrl_shadowed_hi_err_storage, deglitched_io_div2_meas_ctrl_shadowed_hi_err_storage;

Check warning on line 1473 in hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv

View workflow job for this annotation

GitHub Actions / verible-lint

[verible-verilog-lint] reported by reviewdog 🐶 Line length exceeds max: 100; is: 110 [Style: line-length] [line-length] Raw Output: message:"Line length exceeds max: 100; is: 110 [Style: line-length] [line-length]" location:{path:"./hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv" range:{start:{line:1473 column:101}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"}

// flop storage error to filter combinational glitches before sending it across CDC
prim_flop #(
.Width(1),
.ResetValue('0)
) u_io_div2_meas_ctrl_shadowed_hi_err_storage_deglitch (
.clk_i (clk_io_div2_i),
.rst_ni(rst_io_div2_ni),
.d_i (async_io_div2_meas_ctrl_shadowed_hi_err_storage),
.q_o (deglitched_io_div2_meas_ctrl_shadowed_hi_err_storage)
);

// storage error is persistent and can be sampled at any time
prim_flop_2sync #(
Expand All @@ -1455,11 +1490,12 @@ module clkmgr_reg_top (
) u_io_div2_meas_ctrl_shadowed_hi_err_storage_sync (
.clk_i,
.rst_ni,
.d_i(async_io_div2_meas_ctrl_shadowed_hi_err_storage),
.d_i(deglitched_io_div2_meas_ctrl_shadowed_hi_err_storage),
.q_o(io_div2_meas_ctrl_shadowed_hi_storage_err)
);

// update error is transient and must be immediately captured
// prim_pulse_sync flops update_err before sending it across CDC
prim_pulse_sync u_io_div2_meas_ctrl_shadowed_hi_err_update_sync (
.clk_src_i(clk_io_div2_i),
.rst_src_ni(rst_io_div2_ni),
Expand Down Expand Up @@ -1505,7 +1541,18 @@ module clkmgr_reg_top (

// F[lo]: 17:9
logic async_io_div2_meas_ctrl_shadowed_lo_err_update;
logic async_io_div2_meas_ctrl_shadowed_lo_err_storage;
logic async_io_div2_meas_ctrl_shadowed_lo_err_storage, deglitched_io_div2_meas_ctrl_shadowed_lo_err_storage;

Check warning on line 1544 in hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv

View workflow job for this annotation

GitHub Actions / verible-lint

[verible-verilog-lint] reported by reviewdog 🐶 Line length exceeds max: 100; is: 110 [Style: line-length] [line-length] Raw Output: message:"Line length exceeds max: 100; is: 110 [Style: line-length] [line-length]" location:{path:"./hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv" range:{start:{line:1544 column:101}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"}

// flop storage error to filter combinational glitches before sending it across CDC
prim_flop #(
.Width(1),
.ResetValue('0)
) u_io_div2_meas_ctrl_shadowed_lo_err_storage_deglitch (
.clk_i (clk_io_div2_i),
.rst_ni(rst_io_div2_ni),
.d_i (async_io_div2_meas_ctrl_shadowed_lo_err_storage),
.q_o (deglitched_io_div2_meas_ctrl_shadowed_lo_err_storage)
);

// storage error is persistent and can be sampled at any time
prim_flop_2sync #(
Expand All @@ -1514,11 +1561,12 @@ module clkmgr_reg_top (
) u_io_div2_meas_ctrl_shadowed_lo_err_storage_sync (
.clk_i,
.rst_ni,
.d_i(async_io_div2_meas_ctrl_shadowed_lo_err_storage),
.d_i(deglitched_io_div2_meas_ctrl_shadowed_lo_err_storage),
.q_o(io_div2_meas_ctrl_shadowed_lo_storage_err)
);

// update error is transient and must be immediately captured
// prim_pulse_sync flops update_err before sending it across CDC
prim_pulse_sync u_io_div2_meas_ctrl_shadowed_lo_err_update_sync (
.clk_src_i(clk_io_div2_i),
.rst_src_ni(rst_io_div2_ni),
Expand Down Expand Up @@ -1967,7 +2015,18 @@ module clkmgr_reg_top (
usb_usb_meas_ctrl_shadowed_we & usb_usb_meas_ctrl_shadowed_regwen;
// F[hi]: 8:0
logic async_usb_meas_ctrl_shadowed_hi_err_update;
logic async_usb_meas_ctrl_shadowed_hi_err_storage;
logic async_usb_meas_ctrl_shadowed_hi_err_storage, deglitched_usb_meas_ctrl_shadowed_hi_err_storage;

Check warning on line 2018 in hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv

View workflow job for this annotation

GitHub Actions / verible-lint

[verible-verilog-lint] reported by reviewdog 🐶 Line length exceeds max: 100; is: 102 [Style: line-length] [line-length] Raw Output: message:"Line length exceeds max: 100; is: 102 [Style: line-length] [line-length]" location:{path:"./hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv" range:{start:{line:2018 column:101}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"}

// flop storage error to filter combinational glitches before sending it across CDC
prim_flop #(
.Width(1),
.ResetValue('0)
) u_usb_meas_ctrl_shadowed_hi_err_storage_deglitch (
.clk_i (clk_usb_i),
.rst_ni(rst_usb_ni),
.d_i (async_usb_meas_ctrl_shadowed_hi_err_storage),
.q_o (deglitched_usb_meas_ctrl_shadowed_hi_err_storage)
);

// storage error is persistent and can be sampled at any time
prim_flop_2sync #(
Expand All @@ -1976,11 +2035,12 @@ module clkmgr_reg_top (
) u_usb_meas_ctrl_shadowed_hi_err_storage_sync (
.clk_i,
.rst_ni,
.d_i(async_usb_meas_ctrl_shadowed_hi_err_storage),
.d_i(deglitched_usb_meas_ctrl_shadowed_hi_err_storage),
.q_o(usb_meas_ctrl_shadowed_hi_storage_err)
);

// update error is transient and must be immediately captured
// prim_pulse_sync flops update_err before sending it across CDC
prim_pulse_sync u_usb_meas_ctrl_shadowed_hi_err_update_sync (
.clk_src_i(clk_usb_i),
.rst_src_ni(rst_usb_ni),
Expand Down Expand Up @@ -2026,7 +2086,18 @@ module clkmgr_reg_top (

// F[lo]: 17:9
logic async_usb_meas_ctrl_shadowed_lo_err_update;
logic async_usb_meas_ctrl_shadowed_lo_err_storage;
logic async_usb_meas_ctrl_shadowed_lo_err_storage, deglitched_usb_meas_ctrl_shadowed_lo_err_storage;

Check warning on line 2089 in hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv

View workflow job for this annotation

GitHub Actions / verible-lint

[verible-verilog-lint] reported by reviewdog 🐶 Line length exceeds max: 100; is: 102 [Style: line-length] [line-length] Raw Output: message:"Line length exceeds max: 100; is: 102 [Style: line-length] [line-length]" location:{path:"./hw/top_earlgrey/ip_autogen/clkmgr/rtl/clkmgr_reg_top.sv" range:{start:{line:2089 column:101}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"}

// flop storage error to filter combinational glitches before sending it across CDC
prim_flop #(
.Width(1),
.ResetValue('0)
) u_usb_meas_ctrl_shadowed_lo_err_storage_deglitch (
.clk_i (clk_usb_i),
.rst_ni(rst_usb_ni),
.d_i (async_usb_meas_ctrl_shadowed_lo_err_storage),
.q_o (deglitched_usb_meas_ctrl_shadowed_lo_err_storage)
);

// storage error is persistent and can be sampled at any time
prim_flop_2sync #(
Expand All @@ -2035,11 +2106,12 @@ module clkmgr_reg_top (
) u_usb_meas_ctrl_shadowed_lo_err_storage_sync (
.clk_i,
.rst_ni,
.d_i(async_usb_meas_ctrl_shadowed_lo_err_storage),
.d_i(deglitched_usb_meas_ctrl_shadowed_lo_err_storage),
.q_o(usb_meas_ctrl_shadowed_lo_storage_err)
);

// update error is transient and must be immediately captured
// prim_pulse_sync flops update_err before sending it across CDC
prim_pulse_sync u_usb_meas_ctrl_shadowed_lo_err_update_sync (
.clk_src_i(clk_usb_i),
.rst_src_ni(rst_usb_ni),
Expand Down

0 comments on commit e7fc5a2

Please sign in to comment.