Skip to content

Commit

Permalink
[gpio] Removed unnecessary cdc synchornizer on strap_en_i signal
Browse files Browse the repository at this point in the history
Both sender (pwrmgr) and receiver (gpio controller) are on the same clock domain (io_div4)
CDC synchonizer is not required

Signed-off-by: Neeraj Upasani <[email protected]>
  • Loading branch information
Neeraj Upasani authored and andreaskurth committed Apr 3, 2024
1 parent d638842 commit e65178a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions hw/ip/gpio/rtl/gpio.sv
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,13 @@ module gpio
if (GpioAsHwStrapsEn) begin : gen_strap_sample
// sample at gpio inputs at strap_en_i signal pulse.
logic strap_en;
prim_flop_2sync #(
.Width(1)
) u_prim_flop_2sync (
.clk_i,
.rst_ni,
.d_i(strap_en_i),
.q_o(strap_en)
);

// The strap_en_i is a single cycle pulse generated by the pwrmgr
// Both sender (pwrmgr) and receiver (gpio controller) are in the same clock domain (io_div4)
// A cdc synchronizer is not required
//
assign strap_en = strap_en_i;

// we guarantee here by design that this will always be done exactly once per reset cycle.
logic sample_trigger;
assign sample_trigger = strap_en && !reg2hw.hw_straps_data_in_valid.q;
Expand Down

0 comments on commit e65178a

Please sign in to comment.