| From 4ae9016c46c34718a38df0be3ad7317a9c214612 Mon Sep 17 00:00:00 2001 |
| From: Alex Van Damme <atv@google.com> |
| Date: Thu, 12 Sep 2024 10:13:36 -0700 |
| Subject: [PATCH 2/2] AXI-S fixups |
| |
| Change-Id: I19ead18fd791bf70788fe6273005dfe589eb6c6e |
| --- |
| .../src/buses/axi-slave.cpp | 10 +++------- |
| .../VerilatorIntegrationLibrary/src/renode_bus.cpp | 12 ++++++++---- |
| 2 files changed, 11 insertions(+), 11 deletions(-) |
| |
| diff --git a/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/buses/axi-slave.cpp b/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/buses/axi-slave.cpp |
| index f53768f2..2a3678ba 100644 |
| --- a/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/buses/axi-slave.cpp |
| +++ b/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/buses/axi-slave.cpp |
| @@ -28,18 +28,14 @@ void AxiSlave::tick(bool countEnable, uint64_t steps = 1) |
| for(uint64_t i = 0; i < steps; i++) { |
| readHandler(); |
| writeHandler(); |
| - *aclk = 1; |
| - evaluateModel(); |
| updateSignals(); |
| - *aclk = 0; |
| - evaluateModel(); |
| } |
| |
| // Since we can run out of steps during an AXI transaction we must let |
| // the AXI master know that we can't accept more data at the moment. |
| // To do that we set all handshake signals to 0 and readHandler/writeHandler |
| // will handle resuming the transaction once tick is called again. |
| - clearSignals(); |
| + // clearSignals(); |
| |
| if(countEnable) { |
| tickCounter += steps; |
| @@ -127,7 +123,7 @@ void AxiSlave::readHandler() |
| if(readBurstType != AxiBurstType::INCR) |
| throw "Unsupported AXI read burst type"; |
| |
| - if(readNumBytes != int(dataWidth/8)) |
| + if(readNumBytes != int(dataWidth)) |
| throw "Narrow bursts are not supported"; |
| |
| this->agent->log(0, "Axi read start"); |
| @@ -184,7 +180,7 @@ void AxiSlave::writeHandler() |
| if(writeBurstType != AxiBurstType::INCR) |
| throw "Unsupported AXI write burst type"; |
| |
| - if(writeNumBytes != int(dataWidth/8)) |
| + if(writeNumBytes != int(dataWidth)) |
| throw "Narrow bursts are not supported"; |
| |
| this->agent->log(0, "Axi write start"); |
| diff --git a/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/renode_bus.cpp b/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/renode_bus.cpp |
| index c61ce623..df658840 100644 |
| --- a/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/renode_bus.cpp |
| +++ b/src/Plugins/VerilatorPlugin/VerilatorIntegrationLibrary/src/renode_bus.cpp |
| @@ -116,10 +116,14 @@ uint64_t RenodeAgent::requestFromAgent(Action action, uint64_t addr) |
| |
| void RenodeAgent::tick(bool countEnable, uint64_t steps) |
| { |
| - for(auto& b : targetInterfaces) |
| - b->tick(countEnable, steps); |
| - for(auto& b : initatorInterfaces) |
| - b->tick(countEnable, steps); |
| + for (int i = 0; i < steps; ++i) { |
| + for(auto& b : targetInterfaces) { |
| + b->tick(countEnable, 1); |
| + } |
| + for(auto& b : initatorInterfaces) { |
| + b->tick(countEnable, 1); |
| + } |
| + } |
| } |
| |
| void RenodeAgent::timeoutTick(uint8_t* signal, uint8_t expectedValue, int timeout) |
| -- |
| 2.46.0.662.g92d0881bb0-goog |
| |