diff options
author | Christian Menard <Christian.Menard@tu-dresden.de> | 2017-02-09 19:15:48 -0500 |
---|---|---|
committer | Christian Menard <Christian.Menard@tu-dresden.de> | 2017-02-09 19:15:48 -0500 |
commit | 78e4967b6a98e0819e83f000d3a4de8766802bae (patch) | |
tree | 5f067c7145695d783b5637fa26359e432c07aa64 /util/tlm/sc_master_port.cc | |
parent | 0c4a69bcbf851e3ece8fae5b1159540206036ee8 (diff) | |
download | gem5-78e4967b6a98e0819e83f000d3a4de8766802bae.tar.xz |
misc: Clean up and complete the gem5<->SystemC-TLM bridge [9/10]
The current TLM bridge only provides a Slave Port that allows the gem5
world to send request to the SystemC world. This patch series refractors
and cleans up the existing code, and adds a Master Port that allows the
SystemC world to send requests to the gem5 world.
This patch:
* Pay for the header delay that the gem5 XBar annotates to packets.
Reviewed at http://reviews.gem5.org/r/3798/
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'util/tlm/sc_master_port.cc')
-rw-r--r-- | util/tlm/sc_master_port.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/util/tlm/sc_master_port.cc b/util/tlm/sc_master_port.cc index 5f3950260..630243359 100644 --- a/util/tlm/sc_master_port.cc +++ b/util/tlm/sc_master_port.cc @@ -329,9 +329,15 @@ SCMasterPort::recvTimingResp(PacketPtr pkt) sc_assert(pkt->isResponse()); - // pay for annotaded transport delays - auto delay = - sc_core::sc_time::from_value(pkt->payloadDelay + pkt->headerDelay); + /* + * Pay for annotated transport delays. + * + * See recvTimingReq in sc_slave_port.cc for a detailed description. + */ + auto delay = sc_core::sc_time::from_value(pkt->payloadDelay); + // reset the delays + pkt->payloadDelay = 0; + pkt->headerDelay = 0; auto tlmSenderState = dynamic_cast<TlmSenderState*>(pkt->popSenderState()); sc_assert(tlmSenderState != nullptr); |