Skip to content

Commit

Permalink
add clock enables to edge detector
Browse files Browse the repository at this point in the history
  • Loading branch information
jjts committed Nov 14, 2023
1 parent a6b50b9 commit 633b254
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module iob_neg2posedge_sync #(
parameter DATA_W = 21,
parameter RST_VAL = {2*DATA_W{1'b0}}
) (
`include "clk_rst_s_port.vs"
`include "clk_en_rst_s_port.vs"
input [DATA_W-1:0] signal_i,
output reg [DATA_W-1:0] signal_o
);
Expand All @@ -15,7 +15,7 @@ module iob_neg2posedge_sync #(
always @(negedge clk_i, posedge arst_i) begin
if (arst_i) begin
synchronizer <= RST_VAL;
end else begin
end else if (cke_i) begin
synchronizer <= signal_i;
end
end
Expand All @@ -24,7 +24,7 @@ module iob_neg2posedge_sync #(
always @(posedge clk_i, posedge arst_i) begin
if(arst_i) begin
signal_o <= RST_VAL;
end else begin
end else if (cke_i) begin
signal_o <= synchronizer;
end
end
Expand Down

0 comments on commit 633b254

Please sign in to comment.