gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
gem5::VecRegContainer< SIZE > Class Template Reference

Vector Register Abstraction This generic class is the model in a particularization of MVC, to vector registers. More...

#include <vec_reg.hh>

Public Types

using Container = std::array< uint8_t, SIZE >
 

Public Member Functions

 VecRegContainer ()
 
 VecRegContainer (const VecRegContainer &)=default
 
void set (uint8_t val)
 Set the container.
 
void zero ()
 Zero the container.
 
template<size_t S2>
bool operator== (const VecRegContainer< S2 > &that) const
 Equality operator.
 
template<size_t S2>
bool operator!= (const VecRegContainer< S2 > &that) const
 Inequality operator.
 
VecRegContainer< SIZE > & operator= (const VecRegContainer< SIZE > &that)
 Assignment operators.
 

Static Public Member Functions

static constexpr size_t size ()
 

Public Attributes

friend ShowParam< VecRegContainer< SIZE > >
 Used for serialization.
 

Private Attributes

Container container
 
template<typename VecElem >
VecElemas ()
 View interposers.
 
template<typename VecElem >
const VecElemas () const
 
std::string getString (const uint64_t &size) const
 
std::ostream & operator<< (std::ostream &os, const VecRegContainer< SIZE > &v)
 

Detailed Description

template<size_t SIZE>
class gem5::VecRegContainer< SIZE >

Vector Register Abstraction This generic class is the model in a particularization of MVC, to vector registers.

The model has functionality to create views of itself, or a portion through the method 'as

Template Parameters
SzSize of the container in bytes.

Definition at line 125 of file vec_reg.hh.

Member Typedef Documentation

◆ Container

template<size_t SIZE>
using gem5::VecRegContainer< SIZE >::Container = std::array<uint8_t, SIZE>

Definition at line 134 of file vec_reg.hh.

Constructor & Destructor Documentation

◆ VecRegContainer() [1/2]

template<size_t SIZE>
gem5::VecRegContainer< SIZE >::VecRegContainer ( )
inline

Definition at line 140 of file vec_reg.hh.

◆ VecRegContainer() [2/2]

template<size_t SIZE>
gem5::VecRegContainer< SIZE >::VecRegContainer ( const VecRegContainer< SIZE > &  )
default

Member Function Documentation

◆ as() [1/2]

template<size_t SIZE>
template<typename VecElem >
VecElem * gem5::VecRegContainer< SIZE >::as ( )
inline

View interposers.

Create a view of this container as a vector of VecElems with an optional amount of elements. If the amount of elements is provided, the size of the container is checked, to test bounds. If it is not provided, the length is inferred from the container size and the element size.

Template Parameters
VecElemType of each element of the vector for the view.
NumElemAmount of elements in the view.

Definition at line 194 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

Referenced by gem5::RiscvISA::VMaskMergeMicroInst::execute(), gem5::RiscvISA::VlSegDeIntrlvMicroInst::execute(), gem5::RiscvISA::VsSegIntrlvMicroInst::execute(), gem5::ArmISA::RemoteGDB::AArch64GdbRegCache::getRegs(), gem5::trace::TarmacParserRecord::TarmacParserRecordEvent::process(), gem5::ArmISA::RemoteGDB::AArch64GdbRegCache::setRegs(), TwoDifferentVecRegs::SetUp(), TEST(), gem5::trace::ArmNativeTrace::ThreadState::update(), gem5::ArmV8KvmCPU::updateKvmState(), gem5::ArmV8KvmCPU::updateThreadContext(), and gem5::trace::TarmacTracerRecordV8::TraceRegEntryV8::updateVec().

◆ as() [2/2]

template<size_t SIZE>
template<typename VecElem >
const VecElem * gem5::VecRegContainer< SIZE >::as ( ) const
inline

Definition at line 203 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

◆ getString()

template<size_t SIZE>
std::string gem5::VecRegContainer< SIZE >::getString ( const uint64_t &  size) const
inline

◆ operator!=()

template<size_t SIZE>
template<size_t S2>
bool gem5::VecRegContainer< SIZE >::operator!= ( const VecRegContainer< S2 > &  that) const
inline

Inequality operator.

Required to compare thread contexts.

Definition at line 176 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::operator==().

◆ operator=()

template<size_t SIZE>
VecRegContainer< SIZE > & gem5::VecRegContainer< SIZE >::operator= ( const VecRegContainer< SIZE > &  that)
inline

Assignment operators.

From VecRegContainer

Definition at line 153 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

◆ operator==()

template<size_t SIZE>
template<size_t S2>
bool gem5::VecRegContainer< SIZE >::operator== ( const VecRegContainer< S2 > &  that) const
inline

Equality operator.

Required to compare thread contexts.

Definition at line 166 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

Referenced by gem5::VecRegContainer< SIZE >::operator!=().

◆ set()

template<size_t SIZE>
void gem5::VecRegContainer< SIZE >::set ( uint8_t  val)
inline

◆ size()

template<size_t SIZE>
static constexpr size_t gem5::VecRegContainer< SIZE >::size ( )
inlinestaticconstexpr

Definition at line 133 of file vec_reg.hh.

References gem5::SIZE.

Referenced by gem5::VecRegContainer< SIZE >::getString(), and TwoDifferentVecRegs::SetUp().

◆ zero()

template<size_t SIZE>
void gem5::VecRegContainer< SIZE >::zero ( )
inline

Zero the container.

Definition at line 147 of file vec_reg.hh.

References gem5::ArmISA::set.

Referenced by gem5::Iris::ThreadContext::readVecReg().

Friends And Related Symbol Documentation

◆ operator<<

template<size_t SIZE>
std::ostream & operator<< ( std::ostream &  os,
const VecRegContainer< SIZE > &  v 
)
friend

Definition at line 210 of file vec_reg.hh.

Member Data Documentation

◆ container

template<size_t SIZE>
Container gem5::VecRegContainer< SIZE >::container
private

◆ ShowParam< VecRegContainer< SIZE > >

template<size_t SIZE>
friend gem5::VecRegContainer< SIZE >::ShowParam< VecRegContainer< SIZE > >

Used for serialization.

Definition at line 248 of file vec_reg.hh.


The documentation for this class was generated from the following file:

Generated on Mon Jan 13 2025 04:29:00 for gem5 by doxygen 1.9.8