Attention is currently required from: Yu-hsin Wang.

Hello kokoro, Yu-hsin Wang,

I'd like you to do a code review.
Please visit

    https://gem5-review.googlesource.com/c/public/gem5/+/67351?usp=email

to review the following change.


Change subject: fastmodel: Export the "reset_in" reset signal from the PL330.
......................................................................

fastmodel: Export the "reset_in" reset signal from the PL330.

This is essentially the same as how the reset signals were exported
from the CortexR52 which I used as an example, except here there is
only one reset. I passed through with the same name rather than calling
it "model_reset" as in the CortexR52 since the pass through is trivial,
and renaming the signal with no additional functionality seemed like it
would just create confusion. In the CortexR52 case it makes more sense
since there are multiple reset lines that need to be toggled to
actually cause a reset, and a level of abstraction is actually helpful.

Change-Id: I6b61fed6eb1566d131d4b0367fe4ae65031b25f8
Reviewed-on: https://soc-sim-external-review.googlesource.com/c/gem5/gem5/+/9473
Reviewed-by: Yu-hsin Wang <yuhsi...@google.com>
Presubmit-Ready: Gabe Black <gabebl...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py
M src/arch/arm/fastmodel/PL330_DMAC/PL330.lisa
M src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
M src/arch/arm/fastmodel/PL330_DMAC/pl330.hh
4 files changed, 40 insertions(+), 1 deletion(-)



diff --git a/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py b/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py
index ad43fed..21ead52 100644
--- a/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py
+++ b/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py
@@ -26,6 +26,7 @@
 from m5.params import *
 from m5.objects.FastModel import AmbaInitiatorSocket, AmbaTargetSocket
 from m5.objects.IntPin import IntSourcePin
+from m5.objects.ResetPort import ResetResponsePort
 from m5.objects.SystemC import SystemC_ScModule


@@ -197,6 +198,8 @@
     pio_s = AmbaTargetSocket(64, "Register accesses (secure)")
     pio_ns = AmbaTargetSocket(64, "Register accesses (non-secure)")

+    reset_in = ResetResponsePort("System reset")
+
     # irq_abort_master_port
     # irq_master_port
     # pvbus_m
diff --git a/src/arch/arm/fastmodel/PL330_DMAC/PL330.lisa b/src/arch/arm/fastmodel/PL330_DMAC/PL330.lisa
index 3c31c90..d57dfda 100644
--- a/src/arch/arm/fastmodel/PL330_DMAC/PL330.lisa
+++ b/src/arch/arm/fastmodel/PL330_DMAC/PL330.lisa
@@ -64,6 +64,9 @@
         // Interrupts.
         pl330.irq_master_port => self.irq;
         pl330.irq_abort_master_port => self.irq_abort;
+
+        // Reset signals.
+        self.reset_in => pl330.reset_in;
     }

     properties
@@ -85,4 +88,6 @@

     master port<Signal> irq[32];
     master port<Signal> irq_abort;
+
+    slave port<Signal> reset_in;
 }
diff --git a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
index e582404..13162bd 100644
--- a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
+++ b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
@@ -45,7 +45,8 @@
     dma(amba_m, params.name + ".dma", -1),
     pioS(amba_s, params.name + ".pio_s", -1),
     pioNs(amba_s_ns, params.name + ".pio_ns", -1),
-    irqAbortReceiver("irq_abort_receiver")
+    irqAbortReceiver("irq_abort_receiver"),
+    resetIn("reset_in", 0)
 {
     set_parameter("pl330.fifo_size", params.fifo_size);
     set_parameter("pl330.max_transfer", params.max_transfer);
@@ -211,6 +212,9 @@

     // And install it.
     irqAbortReceiver.onChange(abort_change);
+
+    // Plumb the reset signal.
+    resetIn.signal_out.bind(this->reset_in);
 }

 void
@@ -250,6 +254,8 @@
         }
         if (port != -1 && port < irqPort.size())
             return *irqPort[port].at(idx);
+    } else if (if_name == "reset_in") {
+        return resetIn;
     }

     return scx_evs_PL330::gem5_getPort(if_name, idx);
diff --git a/src/arch/arm/fastmodel/PL330_DMAC/pl330.hh b/src/arch/arm/fastmodel/PL330_DMAC/pl330.hh
index 3af56f2..389f704 100644
--- a/src/arch/arm/fastmodel/PL330_DMAC/pl330.hh
+++ b/src/arch/arm/fastmodel/PL330_DMAC/pl330.hh
@@ -39,6 +39,7 @@

 #include "arch/arm/fastmodel/amba_ports.hh"
 #include "arch/arm/fastmodel/common/signal_receiver.hh"
+#include "arch/arm/fastmodel/common/signal_sender.hh"
 #include "arch/arm/fastmodel/protocol/exported_clock_rate_control.hh"
 #include "dev/intpin.hh"
 #include "params/FastModelPL330.hh"
@@ -73,6 +74,8 @@

     void allocateIrq(int idx, int count);

+    SignalSender resetIn;
+
   public:
PL330(const FastModelPL330Params &params, sc_core::sc_module_name _name);
     PL330(const FastModelPL330Params &params) :

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/67351?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6b61fed6eb1566d131d4b0367fe4ae65031b25f8
Gerrit-Change-Number: 67351
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Gabe Black <gabebl...@google.com>
Gerrit-Attention: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to