gem5  v22.1.0.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
gem5::ItsCommand Class Reference

An ItsCommand is created whenever there is a new command in the command queue. More...

#include <gic_v3_its.hh>

Inheritance diagram for gem5::ItsCommand:
gem5::ItsProcess gem5::Packet::SenderState

Classes

union  CommandEntry
 
struct  DispatchEntry
 Dispatch entry is a metadata struct which contains information about the command (like the name) and the function object implementing the command. More...
 

Public Types

enum  CommandType : uint32_t {
  CLEAR = 0x04 , DISCARD = 0x0F , INT = 0x03 , INV = 0x0C ,
  INVALL = 0x0D , MAPC = 0x09 , MAPD = 0x08 , MAPI = 0x0B ,
  MAPTI = 0x0A , MOVALL = 0x0E , MOVI = 0x01 , SYNC = 0x05 ,
  VINVALL = 0x2D , VMAPI = 0x2B , VMAPP = 0x29 , VMAPTI = 0x2A ,
  VMOVI = 0x21 , VMOVP = 0x22 , VSYNC = 0x25
}
 
- Public Types inherited from gem5::ItsProcess
using DTE = Gicv3Its::DTE
 
using ITTE = Gicv3Its::ITTE
 
using CTE = Gicv3Its::CTE
 
using Coroutine = gem5::Coroutine< PacketPtr, ItsAction >
 
using Yield = Coroutine::CallerType
 

Public Member Functions

 ItsCommand (Gicv3Its &_its)
 
 ~ItsCommand ()
 
- Public Member Functions inherited from gem5::ItsProcess
 ItsProcess (Gicv3Its &_its)
 
virtual ~ItsProcess ()
 
const std::string name () const
 Returns the Gicv3Its name. More...
 
ItsAction run (PacketPtr pkt)
 
- Public Member Functions inherited from gem5::Packet::SenderState
 SenderState ()
 
virtual ~SenderState ()
 

Protected Types

using DispatchTable = std::unordered_map< std::underlying_type< enum CommandType >::type, DispatchEntry >
 

Protected Member Functions

void main (Yield &yield) override
 
void readCommand (Yield &yield, CommandEntry &command)
 
void processCommand (Yield &yield, CommandEntry &command)
 
void clear (Yield &yield, CommandEntry &command)
 
void discard (Yield &yield, CommandEntry &command)
 
void mapc (Yield &yield, CommandEntry &command)
 
void mapd (Yield &yield, CommandEntry &command)
 
void mapi (Yield &yield, CommandEntry &command)
 
void mapti (Yield &yield, CommandEntry &command)
 
void movall (Yield &yield, CommandEntry &command)
 
void movi (Yield &yield, CommandEntry &command)
 
void sync (Yield &yield, CommandEntry &command)
 
void doInt (Yield &yield, CommandEntry &command)
 
void inv (Yield &yield, CommandEntry &command)
 
void invall (Yield &yield, CommandEntry &command)
 
void vinvall (Yield &yield, CommandEntry &command)
 
void vmapi (Yield &yield, CommandEntry &command)
 
void vmapp (Yield &yield, CommandEntry &command)
 
void vmapti (Yield &yield, CommandEntry &command)
 
void vmovi (Yield &yield, CommandEntry &command)
 
void vmovp (Yield &yield, CommandEntry &command)
 
void vsync (Yield &yield, CommandEntry &command)
 
bool idOutOfRange (CommandEntry &command, DTE dte) const
 
bool deviceOutOfRange (CommandEntry &command) const
 
bool sizeOutOfRange (CommandEntry &command) const
 
bool collectionOutOfRange (CommandEntry &command) const
 
- Protected Member Functions inherited from gem5::ItsProcess
void reinit ()
 
void writeDeviceTable (Yield &yield, uint32_t device_id, DTE dte)
 
void writeIrqTranslationTable (Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte)
 
void writeIrqCollectionTable (Yield &yield, uint32_t collection_id, CTE cte)
 
uint64_t readDeviceTable (Yield &yield, uint32_t device_id)
 
uint64_t readIrqTranslationTable (Yield &yield, const Addr itt_base, uint32_t event_id)
 
uint64_t readIrqCollectionTable (Yield &yield, uint32_t collection_id)
 
void doRead (Yield &yield, Addr addr, void *ptr, size_t size)
 
void doWrite (Yield &yield, Addr addr, void *ptr, size_t size)
 
void terminate (Yield &yield)
 

Static Protected Member Functions

static std::string commandName (uint32_t cmd)
 

Static Protected Attributes

static DispatchTable cmdDispatcher
 

Additional Inherited Members

- Public Attributes inherited from gem5::Packet::SenderState
SenderStatepredecessor
 
- Protected Attributes inherited from gem5::ItsProcess
Gicv3Itsits
 

Detailed Description

An ItsCommand is created whenever there is a new command in the command queue.

Only one command can be executed per time. main will firstly read the command from memory and then it will process it.

Definition at line 428 of file gic_v3_its.hh.

Member Typedef Documentation

◆ DispatchTable

using gem5::ItsCommand::DispatchTable = std::unordered_map< std::underlying_type<enum CommandType>::type, DispatchEntry>
protected

Definition at line 489 of file gic_v3_its.hh.

Member Enumeration Documentation

◆ CommandType

Enumerator
CLEAR 
DISCARD 
INT 
INV 
INVALL 
MAPC 
MAPD 
MAPI 
MAPTI 
MOVALL 
MOVI 
SYNC 
VINVALL 
VMAPI 
VMAPP 
VMAPTI 
VMOVI 
VMOVP 
VSYNC 

Definition at line 445 of file gic_v3_its.hh.

Constructor & Destructor Documentation

◆ ItsCommand()

gem5::ItsCommand::ItsCommand ( Gicv3Its _its)

◆ ~ItsCommand()

gem5::ItsCommand::~ItsCommand ( )

Member Function Documentation

◆ clear()

void gem5::ItsCommand::clear ( Yield yield,
CommandEntry command 
)
protected

◆ collectionOutOfRange()

bool gem5::ItsCommand::collectionOutOfRange ( CommandEntry command) const
inlineprotected

◆ commandName()

std::string gem5::ItsCommand::commandName ( uint32_t  cmd)
staticprotected

Definition at line 336 of file gic_v3_its.cc.

References cmdDispatcher.

Referenced by readCommand().

◆ deviceOutOfRange()

bool gem5::ItsCommand::deviceOutOfRange ( CommandEntry command) const
inlineprotected

◆ discard()

void gem5::ItsCommand::discard ( Yield yield,
CommandEntry command 
)
protected

◆ doInt()

void gem5::ItsCommand::doInt ( Yield yield,
CommandEntry command 
)
protected

◆ idOutOfRange()

bool gem5::ItsCommand::idOutOfRange ( CommandEntry command,
DTE  dte 
) const
inlineprotected

◆ inv()

void gem5::ItsCommand::inv ( Yield yield,
CommandEntry command 
)
protected

◆ invall()

void gem5::ItsCommand::invall ( Yield yield,
CommandEntry command 
)
protected

◆ main()

void gem5::ItsCommand::main ( Yield yield)
overrideprotectedvirtual

◆ mapc()

void gem5::ItsCommand::mapc ( Yield yield,
CommandEntry command 
)
protected

◆ mapd()

void gem5::ItsCommand::mapd ( Yield yield,
CommandEntry command 
)
protected

◆ mapi()

void gem5::ItsCommand::mapi ( Yield yield,
CommandEntry command 
)
protected

◆ mapti()

void gem5::ItsCommand::mapti ( Yield yield,
CommandEntry command 
)
protected

◆ movall()

void gem5::ItsCommand::movall ( Yield yield,
CommandEntry command 
)
protected

◆ movi()

void gem5::ItsCommand::movi ( Yield yield,
CommandEntry command 
)
protected

◆ processCommand()

void gem5::ItsCommand::processCommand ( Yield yield,
CommandEntry command 
)
protected

Definition at line 381 of file gic_v3_its.cc.

References cmdDispatcher, panic, and gem5::ItsCommand::CommandEntry::type.

Referenced by main().

◆ readCommand()

void gem5::ItsCommand::readCommand ( Yield yield,
CommandEntry command 
)
protected

◆ sizeOutOfRange()

bool gem5::ItsCommand::sizeOutOfRange ( CommandEntry command) const
inlineprotected

◆ sync()

void gem5::ItsCommand::sync ( Yield yield,
CommandEntry command 
)
protected

Definition at line 735 of file gic_v3_its.cc.

References warn.

◆ vinvall()

void gem5::ItsCommand::vinvall ( Yield yield,
CommandEntry command 
)
protected

Definition at line 741 of file gic_v3_its.cc.

References panic.

◆ vmapi()

void gem5::ItsCommand::vmapi ( Yield yield,
CommandEntry command 
)
protected

Definition at line 747 of file gic_v3_its.cc.

References panic.

◆ vmapp()

void gem5::ItsCommand::vmapp ( Yield yield,
CommandEntry command 
)
protected

Definition at line 753 of file gic_v3_its.cc.

References panic.

◆ vmapti()

void gem5::ItsCommand::vmapti ( Yield yield,
CommandEntry command 
)
protected

Definition at line 759 of file gic_v3_its.cc.

References panic.

◆ vmovi()

void gem5::ItsCommand::vmovi ( Yield yield,
CommandEntry command 
)
protected

Definition at line 765 of file gic_v3_its.cc.

References panic.

◆ vmovp()

void gem5::ItsCommand::vmovp ( Yield yield,
CommandEntry command 
)
protected

Definition at line 771 of file gic_v3_its.cc.

References panic.

◆ vsync()

void gem5::ItsCommand::vsync ( Yield yield,
CommandEntry command 
)
protected

Definition at line 777 of file gic_v3_its.cc.

References panic.

Member Data Documentation

◆ cmdDispatcher

ItsCommand::DispatchTable gem5::ItsCommand::cmdDispatcher
staticprotected
Initial value:
=
{
}
void movall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:660
void doInt(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:468
void sync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:735
void vsync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:777
void invall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:537
void vmapp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:753
void mapd(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:574
void discard(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:429
void vmovp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:771
void vmovi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:765
void vmapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:759
void clear(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:394
void movi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:674
void mapc(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:557
void vinvall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:741
void inv(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:503
void vmapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:747
void mapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:590
void mapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:624
#define COMMAND(x, method)
Definition: gic_v3_its.cc:54

Definition at line 492 of file gic_v3_its.hh.

Referenced by commandName(), and processCommand().


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

Generated on Wed Dec 21 2022 10:23:17 for gem5 by doxygen 1.9.1