SST  7.1.0
StructuralSimulationToolkit
SST::Interfaces::SimpleMem::Request Class Reference

Represents both memory requests and responses. More...

#include <simpleMem.h>

Public Types

enum  Command {
  Read, Write, ReadResp, WriteResp,
  FlushLine, FlushLineInv, FlushLineResp, TxBegin,
  TxEnd, TxResp, TxAbort, TxCommit
}
 Commands and responses possible with a Request object. More...
 
enum  Flags {
  F_NONCACHEABLE = 1<<1, F_LOCKED = 1<<2, F_LLSC = 1<<3, F_LLSC_RESP = 1<<4,
  F_FLUSH_SUCCESS = 1<<5, F_TRANSACTION = 1<<6
}
 Flags to specify conditions on a Request. More...
 
typedef uint64_t id_t
 
typedef uint32_t flags_t
 
typedef std::vector< uint8_t > dataVec
 Type of the payload or data.
 

Public Member Functions

 Request (Command cmd, Addr addr, size_t size, dataVec &data, flags_t flags=0, flags_t memFlags=0)
 Constructor.
 
 Request (Command cmd, Addr addr, size_t size, flags_t flags=0, flags_t memFlags=0)
 Constructor.
 
void addAddress (Addr addr)
 
void setPayload (const std::vector< uint8_t > &data_in)
 Set the contents of the payload / data field. More...
 
void setPayload (uint8_t *data_in, size_t len)
 Set the contents of the payload / data field. More...
 
void setVirtualAddress (const Addr newVA)
 Set the virtual address associated with the operation. More...
 
uint64_t getVirtualAddress ()
 
void setInstructionPointer (const Addr newIP)
 Sets the instruction pointer associated with the operation. More...
 
Addr getInstructionPointer ()
 
void clearFlags (void)
 Clears the flags associated with the operation.
 
void setFlags (flags_t inValue)
 
flags_t getFlags (void)
 
void clearMemFlags (void)
 Clears the memory flags associated with the operation.
 
void setMemFlags (flags_t inValue)
 
flags_t getMemFlags (void)
 

Data Fields

Command cmd
 
std::vector< Addraddrs
 
Addr addr
 
size_t size
 
dataVec data
 
flags_t flags
 
flags_t memFlags
 
id_t id
 
Addr instrPtr
 
Addr virtualAddr
 

Detailed Description

Represents both memory requests and responses.

Member Typedef Documentation

◆ flags_t

◆ id_t

Member Enumeration Documentation

◆ Command

Commands and responses possible with a Request object.

Enumerator
Read 

Issue a Read from Memory

Write 

Issue a Write to Memory

ReadResp 

Response from Memory to a Read

WriteResp 

Response from Memory to a Write

FlushLine 

Cache flush request - writeback specified line throughout memory system

FlushLineInv 

Cache flush request - writeback and invalidate specified line throughout memory system

FlushLineResp 

Response to FlushLine; flag F_FLUSH_SUCCESS indicates success or failure

TxBegin 

Start a new transaction

TxEnd 

End the current lowest transaction

◆ Flags

Flags to specify conditions on a Request.

Enumerator
F_NONCACHEABLE 

This request should not be cached

F_LOCKED 

This request should be locked. A LOCKED read should be soon followed by a LOCKED write (to unlock)

F_FLUSH_SUCCESS 

This flag is set if the flush was successful. Flush may fail due to LOCKED lines

Member Function Documentation

◆ getFlags()

flags_t SST::Interfaces::SimpleMem::Request::getFlags ( void  )
inline
Returns
the flags associated with the operation

References flags.

◆ getInstructionPointer()

Addr SST::Interfaces::SimpleMem::Request::getInstructionPointer ( )
inline
Returns
the instruction pointer associated with the operation

References instrPtr.

◆ getMemFlags()

flags_t SST::Interfaces::SimpleMem::Request::getMemFlags ( void  )
inline
Returns
the memory flags associated with the operation

References memFlags.

◆ getVirtualAddress()

uint64_t SST::Interfaces::SimpleMem::Request::getVirtualAddress ( )
inline
Returns
the virtual address associated with the operation

References virtualAddr.

◆ setFlags()

void SST::Interfaces::SimpleMem::Request::setFlags ( flags_t  inValue)
inline
Parameters
[in]inValueShould be one of the flags beginning with F_ in simpleMem

◆ setInstructionPointer()

void SST::Interfaces::SimpleMem::Request::setInstructionPointer ( const Addr  newIP)
inline

Sets the instruction pointer associated with the operation.

Parameters
[in]newIP

◆ setMemFlags()

void SST::Interfaces::SimpleMem::Request::setMemFlags ( flags_t  inValue)
inline
Parameters
[in]inValueShould be one of the flags beginning with F_ in simpleMem

◆ setPayload() [1/2]

void SST::Interfaces::SimpleMem::Request::setPayload ( const std::vector< uint8_t > &  data_in)
inline

Set the contents of the payload / data field.

Parameters
[in]data_in

◆ setPayload() [2/2]

void SST::Interfaces::SimpleMem::Request::setPayload ( uint8_t *  data_in,
size_t  len 
)
inline

Set the contents of the payload / data field.

Parameters
[in]data_in

◆ setVirtualAddress()

void SST::Interfaces::SimpleMem::Request::setVirtualAddress ( const Addr  newVA)
inline

Set the virtual address associated with the operation.

Parameters
[in]newVA

Field Documentation

◆ addr

Addr SST::Interfaces::SimpleMem::Request::addr

Target address - DEPRECATED but included for backward compatibility, defaults to addrs[0]

◆ addrs

std::vector<Addr> SST::Interfaces::SimpleMem::Request::addrs

Target address(es)

◆ cmd

Command SST::Interfaces::SimpleMem::Request::cmd

Command to issue

◆ data

dataVec SST::Interfaces::SimpleMem::Request::data

Payload data (for Write, or ReadResp)

Referenced by SST::Interfaces::SimpleMem::Handler< classT, argT >::operator()().

◆ flags

flags_t SST::Interfaces::SimpleMem::Request::flags

Flags associated with this request or response

Referenced by getFlags().

◆ id

id_t SST::Interfaces::SimpleMem::Request::id

Unique ID to identify responses with requests

◆ instrPtr

Addr SST::Interfaces::SimpleMem::Request::instrPtr

Instruction pointer associated with the operation

Referenced by getInstructionPointer().

◆ memFlags

flags_t SST::Interfaces::SimpleMem::Request::memFlags

Memory flags - ignored by caches except to be passed through with request to main memory

Referenced by getMemFlags().

◆ size

size_t SST::Interfaces::SimpleMem::Request::size

Size of this request or response

◆ virtualAddr

Addr SST::Interfaces::SimpleMem::Request::virtualAddr

Virtual address associated with the operation

Referenced by getVirtualAddress().


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