Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pwrmgr, top_darjeeling] Take external SoC reset into account in FSM #22575

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

neeraj-rv
Copy link
Contributor

@neeraj-rv neeraj-rv commented Apr 15, 2024

  1. Internally generated reset request passed to SoC.
  2. Create a sticky assertion internally to log request.
    Sticky flag cleared only upon external reset deassertion.
  3. SoC transfers this request to platform to assert external reset.
  4. External SoC reset deasserts after some time.
  5. Pwrmgr stays in FastPwrStateRstWait state until the external SoC
    reset deasserts.
  6. Boot / reset sequence continues.
  7. Also fixes the external reset signal glitch filter to use the por
    reset. This is required to make sure that the external reset state
    does not self-reset once asserted and faithfully forwards that state
    to pwrmgr.
  8. Added some debug visibility signals for pwrmgr.
  9. Added temporary reset loop back path in pwrmgr TB to translate
    internal reset req from OT --> ext reset from SoC to OT. Needs a
    proper fix in testbench (issue [pwrmgr, top_darjeeling] Model external reset request in block- and top-level DV #22710).

@neeraj-rv neeraj-rv requested a review from a team as a code owner April 15, 2024 22:54
@neeraj-rv neeraj-rv requested review from rswarbrick and andreaskurth and removed request for a team April 15, 2024 22:54
@neeraj-rv neeraj-rv force-pushed the extrst_fix branch 2 times, most recently from 0258b20 to c1835b6 Compare April 16, 2024 01:57
@neeraj-rv neeraj-rv requested a review from msfschaffner as a code owner April 16, 2024 01:57
@neeraj-rv neeraj-rv force-pushed the extrst_fix branch 2 times, most recently from 16de381 to c058079 Compare April 16, 2024 17:07
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
@neeraj-rv neeraj-rv force-pushed the extrst_fix branch 2 times, most recently from 054551d to a9c7ca9 Compare April 16, 2024 23:47
.bazelrc Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr_fsm.sv Outdated Show resolved Hide resolved
hw/top_darjeeling/data/top_darjeeling.hjson Outdated Show resolved Hide resolved
util/topgen/templates/chiplevel.sv.tpl Outdated Show resolved Hide resolved
util/topgen/templates/chiplevel.sv.tpl Show resolved Hide resolved
util/topgen/templates/chiplevel.sv.tpl Show resolved Hide resolved
hw/top_darjeeling/ip/rstmgr/rtl/autogen/rstmgr.sv Outdated Show resolved Hide resolved
@neeraj-rv neeraj-rv force-pushed the extrst_fix branch 2 times, most recently from ddc55ec to 288afb2 Compare April 17, 2024 20:43
Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can work, but we need to check and change a few things before merging, and then create some issues to follow up on

hw/ip/pwrmgr/rtl/pwrmgr.sv Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr_fsm.sv Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr_fsm.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr_fsm.sv Outdated Show resolved Hide resolved
util/topgen/templates/chiplevel.sv.tpl Show resolved Hide resolved
util/topgen/templates/chiplevel.sv.tpl Outdated Show resolved Hide resolved
hw/ip/pwrmgr/dv/tb.sv Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
hw/ip/pwrmgr/rtl/pwrmgr.sv Outdated Show resolved Hide resolved
1. Internally generated reset request passed to SoC.
2. Create a sticky assertion internally to log request.
   Sticky flag cleared only upon external reset deassertion.
3. SoC transfers this request to platform to assert external reset.
4. External SoC reset deasserts after some time.
5. Pwrmgr stays in FastPwrStateRstWait state until the external SoC
   reset deasserts.
6. Boot / reset sequence continues.
7. Also fixes the external reset signal glitch filter to use the por
   reset. This is required to make sure that the external reset state
   does not self-reset once asserted and faithfully forwards that state
   to pwrmgr.
8. Added some debug visibility signals for pwrmgr.
9. Added temporary reset loop back path in pwrmgr TB to translate
   internal reset req from OT --> ext reset from SoC to OT.  Needs a
   proper fix in testbench (issue lowRISC#22710).

Signed-off-by: Neeraj Upasani <[email protected]>
@andreaskurth
Copy link
Contributor

CHANGE AUTHORIZED: hw/ip/pwrmgr/rtl/pwrmgr.sv
CHANGE AUTHORIZED: hw/ip/pwrmgr/rtl/pwrmgr_fsm.sv
CHANGE AUTHORIZED: hw/ip/pwrmgr/rtl/pwrmgr_pkg.sv
CHANGE AUTHORIZED: hw/top_darjeeling/data/top_darjeeling.hjson
CHANGE AUTHORIZED: hw/top_darjeeling/ip/soc_proxy/data/soc_proxy.hjson
CHANGE AUTHORIZED: hw/top_darjeeling/ip/soc_proxy/rtl/soc_proxy.sv
CHANGE AUTHORIZED: hw/top_darjeeling/rtl/autogen/chip_darjeeling_asic.sv
CHANGE AUTHORIZED: hw/top_darjeeling/rtl/autogen/chip_darjeeling_cw310.sv
CHANGE AUTHORIZED: hw/top_darjeeling/rtl/autogen/top_darjeeling.sv
CHANGE AUTHORIZED: hw/top_darjeeling/rtl/chip_darjeeling_verilator.sv

@andreaskurth andreaskurth changed the title [pwrmgr] Insert Interlock between External SoC Reset and Pwrmgr FSM [pwrmgr] Take external SoC reset into account in FSM Apr 18, 2024
@andreaskurth andreaskurth changed the title [pwrmgr] Take external SoC reset into account in FSM [pwrmgr, top_darjeeling] Take external SoC reset into account in FSM Apr 18, 2024
@andreaskurth andreaskurth merged commit d4aa482 into lowRISC:integrated_dev Apr 19, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants