gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: fastmodel: Forward AXI4 cache attribute to tlm

WC
Wei-Han Chen (Gerrit)
Fri, Apr 7, 2023 2:39 AM

Wei-Han Chen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69479?usp=email )

Change subject: fastmodel: Forward AXI4 cache attribute to tlm
......................................................................

fastmodel: Forward AXI4 cache attribute to tlm

We have AXI4 cache attribute in ControlExtension now. Forward this
information from amba world to tlm and vice versa.

Change-Id: Ib5c001480dd680b14cc44f264cd55e142a2aa3d8

M src/arch/arm/fastmodel/amba_from_tlm_bridge.cc
M src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc
b/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc
index 8db0d6a..d21b5f8 100644
--- a/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc
+++ b/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc
@@ -115,6 +115,19 @@
amba_ex->set_privileged(control_ex->isPrivileged());
amba_ex->set_non_secure(!control_ex->isSecure());
amba_ex->set_instruction(control_ex->isInstruction());
+

  • if (control_ex->hasBufferable()) {
  •    amba_ex->set_bufferable(control_ex->getBufferable().value());
    
  • }
  • if (control_ex->hasModifiable()) {
  •    amba_ex->set_modifiable(control_ex->getModifiable().value());
    
  • }
  • if (control_ex->hasReadAllocate()) {
  •    amba_ex->set_read_allocate(control_ex->getReadAllocate().value());
    
  • }
  • if (control_ex->hasWriteAllocate()) {

amba_ex->set_write_allocate(control_ex->getWriteAllocate().value());

  • }
    }

    } // namespace fastmodel
    diff --git a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
    b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
    index 2f065fc..acebe50 100644
    --- a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
    +++ b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
    @@ -196,6 +196,11 @@
    control_ex->setStreamId(amba_ex->get_id());
    }

  • control_ex->setBufferable(amba_ex->is_bufferable());

  • control_ex->setModifiable(amba_ex->is_modifiable());

  • control_ex->setReadAllocate(amba_ex->is_read_allocate());

  • control_ex->setWriteAllocate(amba_ex->is_write_allocate());

  • if (trans.has_mm()) {
        trans.set_auto_extension(control_ex);
    } else {
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69479?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: Ib5c001480dd680b14cc44f264cd55e142a2aa3d8
Gerrit-Change-Number: 69479
Gerrit-PatchSet: 1
Gerrit-Owner: Wei-Han Chen weihanchen@google.com
Gerrit-MessageType: newchange

Wei-Han Chen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69479?usp=email ) Change subject: fastmodel: Forward AXI4 cache attribute to tlm ...................................................................... fastmodel: Forward AXI4 cache attribute to tlm We have AXI4 cache attribute in ControlExtension now. Forward this information from amba world to tlm and vice versa. Change-Id: Ib5c001480dd680b14cc44f264cd55e142a2aa3d8 --- M src/arch/arm/fastmodel/amba_from_tlm_bridge.cc M src/arch/arm/fastmodel/amba_to_tlm_bridge.cc 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc b/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc index 8db0d6a..d21b5f8 100644 --- a/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc +++ b/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc @@ -115,6 +115,19 @@ amba_ex->set_privileged(control_ex->isPrivileged()); amba_ex->set_non_secure(!control_ex->isSecure()); amba_ex->set_instruction(control_ex->isInstruction()); + + if (control_ex->hasBufferable()) { + amba_ex->set_bufferable(control_ex->getBufferable().value()); + } + if (control_ex->hasModifiable()) { + amba_ex->set_modifiable(control_ex->getModifiable().value()); + } + if (control_ex->hasReadAllocate()) { + amba_ex->set_read_allocate(control_ex->getReadAllocate().value()); + } + if (control_ex->hasWriteAllocate()) { + amba_ex->set_write_allocate(control_ex->getWriteAllocate().value()); + } } } // namespace fastmodel diff --git a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc index 2f065fc..acebe50 100644 --- a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc +++ b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc @@ -196,6 +196,11 @@ control_ex->setStreamId(amba_ex->get_id()); } + control_ex->setBufferable(amba_ex->is_bufferable()); + control_ex->setModifiable(amba_ex->is_modifiable()); + control_ex->setReadAllocate(amba_ex->is_read_allocate()); + control_ex->setWriteAllocate(amba_ex->is_write_allocate()); + if (trans.has_mm()) { trans.set_auto_extension(control_ex); } else { -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69479?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: Ib5c001480dd680b14cc44f264cd55e142a2aa3d8 Gerrit-Change-Number: 69479 Gerrit-PatchSet: 1 Gerrit-Owner: Wei-Han Chen <weihanchen@google.com> Gerrit-MessageType: newchange