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://gem5-review.googlesource.com/c/public/gem5/+/67351
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2023-01-12 01:05:32 -08:00
committed by Gabe Black
parent 76b74fa51f
commit f7857867ae
4 changed files with 18 additions and 1 deletions

View File

@@ -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 @@ class FastModelPL330(SystemC_ScModule):
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

View File

@@ -64,6 +64,9 @@ component PL330
// 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 @@ component PL330
master port<Signal> irq[32];
master port<Signal> irq_abort;
slave port<Signal> reset_in;
}

View File

@@ -45,7 +45,8 @@ PL330::PL330(const FastModelPL330Params &params,
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 @@ PL330::PL330(const FastModelPL330Params &params,
// And install it.
irqAbortReceiver.onChange(abort_change);
// Plumb the reset signal.
resetIn.signal_out.bind(this->reset_in);
}
void
@@ -250,6 +254,8 @@ PL330::gem5_getPort(const std::string &if_name, int idx)
}
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);

View File

@@ -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 @@ class PL330 : public scx_evs_PL330
void allocateIrq(int idx, int count);
SignalSender resetIn;
public:
PL330(const FastModelPL330Params &params, sc_core::sc_module_name _name);
PL330(const FastModelPL330Params &params) :