Skip to content

Commit

Permalink
[hw,topgen] regenerated regs and top
Browse files Browse the repository at this point in the history
Signed-off-by: Neeraj Upasani <[email protected]>
  • Loading branch information
Neeraj Upasani committed Apr 17, 2024
1 parent a9c7ca9 commit 7d843b1
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion hw/top_darjeeling/ip/pwrmgr/data/autogen/pwrmgr.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
local: "false",
expose: "true"
},

{ name: "NumRstReqs",
desc: "Number of peripheral reset requets",
type: "int",
Expand Down
26 changes: 25 additions & 1 deletion hw/top_darjeeling/rtl/autogen/chip_darjeeling_asic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,30 @@ module chip_darjeeling_asic #(
{soc_proxy_pkg::NumFatalExternalAlerts{soc_proxy_pkg::SOC_ALERT_REQ_DEFAULT}};
assign soc_recov_alert_req =
{soc_proxy_pkg::NumRecovExternalAlerts{soc_proxy_pkg::SOC_ALERT_REQ_DEFAULT}};

logic internal_request_d, internal_request_q;
logic external_reset, count_up;
logic [3:0] count;
assign internal_request_d = pwrmgr_boot_status.light_reset_req;
always_ff @(posedge ast_base_clks.clk_aon or negedge por_n[0]) begin : extrst
if (!por_n[0]) begin
external_reset <= 1'b0;
internal_request_q <= 1'b0;
count_up <= '0;
count <= '0;
end else begin
internal_request_q <= internal_request_d;
if (!internal_request_q && internal_request_d) begin
count_up <= 1'b1;
external_reset <= 1;
end else if (count == 'd8) begin
count_up <= 0;
external_reset <= 0;
count <= '0;
end else if (count_up)
count <= count + 1;
end
end : extrst

//////////////////////
// Top-level design //
Expand Down Expand Up @@ -1565,7 +1589,7 @@ module chip_darjeeling_asic #(
.soc_intr_async_i ( '0 ),
.soc_wkup_async_i ( 1'b0 ),
// FIXME: Needs better loopback fix
.soc_rst_req_async_i ( pwrmgr_boot_status.light_reset_req),
.soc_rst_req_async_i ( external_reset ),
// FIXME_END
.soc_lsio_trigger_i ( '0 ),
.entropy_src_hw_if_req_o ( entropy_src_hw_if_req ),
Expand Down
23 changes: 0 additions & 23 deletions hw/top_darjeeling/rtl/autogen/chip_darjeeling_cw310.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1363,29 +1363,6 @@ module chip_darjeeling_cw310 #(
assign srst_n = manual_in_por_button_n;


logic internal_request_d, internal_request_q;
logic external_reset, count_up;
logic [3:0] count;
assign internal_request_d = pwrmgr_boot_status.light_reset_req;
always_ff @(posedge ast_base_clks.clk_aon or negedge por_n[0]) begin : extrst
if (!por_n[0]) begin
external_reset <= 1'b0;
internal_request_q <= 1'b0;
count_up <= '0;
count <= '0;
end else begin
internal_request_q <= internal_request_d;
if (!internal_request_q && internal_request_d) begin
count_up <= 1'b1;
external_reset <= 1;
end else if (count == 'd8) begin
count_up <= 0;
external_reset <= 0;
count <= '0;
end else if (count_up)
count <= count + 1;
end
end : extrst

//////////////////////
// Top-level design //
Expand Down
2 changes: 1 addition & 1 deletion hw/top_earlgrey/ip/pwrmgr/data/autogen/pwrmgr.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
local: "false",
expose: "true"
},

{ name: "NumRstReqs",
desc: "Number of peripheral reset requets",
type: "int",
Expand Down
51 changes: 25 additions & 26 deletions util/topgen/templates/chiplevel.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,30 @@ module chip_${top["name"]}_${target["name"]} #(
{soc_proxy_pkg::NumFatalExternalAlerts{soc_proxy_pkg::SOC_ALERT_REQ_DEFAULT}};
assign soc_recov_alert_req =
{soc_proxy_pkg::NumRecovExternalAlerts{soc_proxy_pkg::SOC_ALERT_REQ_DEFAULT}};

logic internal_request_d, internal_request_q;
logic external_reset, count_up;
logic [3:0] count;
assign internal_request_d = pwrmgr_boot_status.light_reset_req;
always_ff @(posedge ast_base_clks.clk_aon or negedge por_n[0]) begin : extrst
if (!por_n[0]) begin
external_reset <= 1'b0;
internal_request_q <= 1'b0;
count_up <= '0;
count <= '0;
end else begin
internal_request_q <= internal_request_d;
if (!internal_request_q && internal_request_d) begin
count_up <= 1'b1;
external_reset <= 1;
end else if (count == 'd8) begin
count_up <= 0;
external_reset <= 0;
count <= '0;
end else if (count_up)
count <= count + 1;
end
end : extrst

% endif
//////////////////////
Expand Down Expand Up @@ -1297,7 +1321,7 @@ module chip_${top["name"]}_${target["name"]} #(
.soc_intr_async_i ( '0 ),
.soc_wkup_async_i ( 1'b0 ),
// FIXME: Needs better loopback fix
.soc_rst_req_async_i ( pwrmgr_boot_status.light_reset_req),
.soc_rst_req_async_i ( external_reset ),
// FIXME_END
.soc_lsio_trigger_i ( '0 ),
.entropy_src_hw_if_req_o ( entropy_src_hw_if_req ),
Expand Down Expand Up @@ -1442,31 +1466,6 @@ module chip_${top["name"]}_${target["name"]} #(
assign otp_obs_o = '0;
% endif

% if top["name"] == "darjeeling":
logic internal_request_d, internal_request_q;
logic external_reset, count_up;
logic [3:0] count;
assign internal_request_d = pwrmgr_boot_status.light_reset_req;
always_ff @(posedge ast_base_clks.clk_aon or negedge por_n[0]) begin : extrst
if (!por_n[0]) begin
external_reset <= 1'b0;
internal_request_q <= 1'b0;
count_up <= '0;
count <= '0;
end else begin
internal_request_q <= internal_request_d;
if (!internal_request_q && internal_request_d) begin
count_up <= 1'b1;
external_reset <= 1;
end else if (count == 'd8) begin
count_up <= 0;
external_reset <= 0;
count <= '0;
end else if (count_up)
count <= count + 1;
end
end : extrst
% endif

//////////////////////
// Top-level design //
Expand Down

0 comments on commit 7d843b1

Please sign in to comment.