|
Rcuxx::RcuMemory Class Reference |
Public Types | |
typedef std::vector< unsigned int > | Cache_t |
Public Member Functions | |
RcuMemory (Rcu &rcu, const char *name, unsigned int base, unsigned int size, unsigned int max, bool commit, RcuCommand *clear=0, RcuCommand *exec=0, RcuCommand *abort=0) | |
virtual | ~RcuMemory () |
virtual unsigned int | Update () |
virtual unsigned int | Commit () |
virtual unsigned int | Update (size_t off, size_t n) |
virtual unsigned int | Commit (size_t off, size_t n) |
virtual unsigned int | Clear () |
virtual unsigned int | Exec (unsigned int arg) |
virtual unsigned int | Abort () |
virtual bool | Load (std::istream &in) |
virtual bool | Save (std::ostream &out) |
virtual void | Zero () |
unsigned int | Size () const |
unsigned int | Max () const |
const Cache_t & | Data () const |
Cache_t & | Data () |
void | Set (size_t off, size_t n, unsigned int *d) |
void | Get (size_t off, size_t n, unsigned int *d) |
unsigned int | Base () const |
virtual void | Print () const |
const std::string & | Name () const |
virtual bool | IsWriteable () const |
virtual bool | IsClearable () const |
virtual bool | IsExecutable () const |
Protected Attributes | |
Rcu & | fRcu |
std::string | fName |
unsigned int | fBase |
Cache_t | fData |
unsigned int | fSize |
unsigned int | fMax |
bool | fWriteable |
RcuCommand * | fClear |
RcuCommand * | fExec |
RcuCommand * | fAbort |
typedef std::vector<unsigned int> Rcuxx::RcuMemory::Cache_t |
Type of cache.
Rcuxx::RcuMemory::RcuMemory | ( | Rcu & | rcu, | |
const char * | name, | |||
unsigned int | base, | |||
unsigned int | size, | |||
unsigned int | max, | |||
bool | commit, | |||
RcuCommand * | clear = 0 , |
|||
RcuCommand * | exec = 0 , |
|||
RcuCommand * | abort = 0 | |||
) | [inline] |
Constructor.
rcu | Reference to RCU | |
name | Name of the memory | |
base | Base address | |
size | Number of words in the memory | |
max | Maximum value of words in the memory | |
commit | Whether the memory is writeable | |
clear | Command to clear | |
exec | Command to execute | |
abort | Command to abort execution. |
References Zero().
virtual Rcuxx::RcuMemory::~RcuMemory | ( | ) | [inline, virtual] |
Destructor.
virtual unsigned int Rcuxx::RcuMemory::Update | ( | ) | [inline, virtual] |
Update the cache.
Reimplemented in Rcuxx::RcuACL, Rcuxx::RcuDMEM, and Rcuxx::RcuSTATUS.
References fSize.
Referenced by Rcuxx::RcuRMEM::FecCommand(), Rcuxx::RcuRMEM::FecRead(), Rcuxx::RcuRMEM::FecWrite(), Rcuxx::RcuSTATUS::Update(), Rcuxx::RcuRegister::Update(), Rcuxx::RcuACTFEC::Update(), and Rcuxx::RcuACL::Update().
virtual unsigned int Rcuxx::RcuMemory::Commit | ( | ) | [inline, virtual] |
Commit to the RCU.
Reimplemented in Rcuxx::RcuACL, and Rcuxx::RcuDMEM.
References fSize.
Referenced by Rcuxx::RcuRegister::Commit(), Rcuxx::RcuDMEM::Commit(), Rcuxx::RcuACTFEC::Commit(), Rcuxx::RcuACL::Commit(), and Rcuxx::RcuIMEM::Execute().
unsigned int Rcuxx::RcuMemory::Update | ( | size_t | off, | |
size_t | n | |||
) | [inline, virtual] |
Update the cache (restricted).
off | Where to start reading | |
n | How many words to read |
Reimplemented in Rcuxx::RcuACL, Rcuxx::RcuDMEM, and Rcuxx::RcuSTATUS.
References fBase, fData, fRcu, fSize, and Rcuxx::Rcu::ReadMemory().
unsigned int Rcuxx::RcuMemory::Commit | ( | size_t | off, | |
size_t | n | |||
) | [inline, virtual] |
Write to the hardware (restricted).
off | Where to start reading | |
n | How many words to read |
Reimplemented in Rcuxx::RcuACL, and Rcuxx::RcuDMEM.
References fBase, fData, fRcu, fSize, and Rcuxx::Rcu::WriteMemory().
unsigned int Rcuxx::RcuMemory::Clear | ( | ) | [inline, virtual] |
unsigned int Rcuxx::RcuMemory::Exec | ( | unsigned int | arg | ) | [inline, virtual] |
Clear memory.
References Rcuxx::RcuCommand::Commit(), and fExec.
Referenced by Rcuxx::RcuIMEM::Execute().
unsigned int Rcuxx::RcuMemory::Abort | ( | ) | [inline, virtual] |
bool Rcuxx::RcuMemory::Load | ( | std::istream & | in | ) | [inline, virtual] |
bool Rcuxx::RcuMemory::Save | ( | std::ostream & | out | ) | [inline, virtual] |
void Rcuxx::RcuMemory::Zero | ( | ) | [inline, virtual] |
Zero the memory.
Reimplemented in Rcuxx::RcuACL.
References fData.
Referenced by RcuMemory(), and Rcuxx::RcuACL::Zero().
unsigned int Rcuxx::RcuMemory::Size | ( | ) | const [inline] |
References fSize.
Referenced by Rcuxx::RcuACTFEC::ACLSync(), and Rcuxx::RcuACTFEC::SyncToACL().
unsigned int Rcuxx::RcuMemory::Max | ( | ) | const [inline] |
Cache_t& Rcuxx::RcuMemory::Data | ( | ) | [inline] |
void Rcuxx::RcuMemory::Set | ( | size_t | off, | |
size_t | n, | |||
unsigned int * | d | |||
) | [inline] |
Set the cache.
off | Starting offset | |
n | How many words (size of d) | |
d | The values Set |
Reimplemented in Rcuxx::RcuACL.
Referenced by Rcuxx::RcuIMEM::Append(), Rcuxx::RcuRegister::Commit(), Rcuxx::RcuACTFEC::Commit(), and Rcuxx::RcuACL::Set().
void Rcuxx::RcuMemory::Get | ( | size_t | off, | |
size_t | n, | |||
unsigned int * | d | |||
) | [inline] |
Get the cache.
off | Starting offset | |
n | How many words (size of d) | |
d | On return, the values |
Reimplemented in Rcuxx::RcuACL.
Referenced by Rcuxx::RcuACL::Get(), Rcuxx::RcuRegister::Update(), and Rcuxx::RcuACTFEC::Update().
unsigned int Rcuxx::RcuMemory::Base | ( | ) | const [inline] |
void Rcuxx::RcuMemory::Print | ( | ) | const [inline, virtual] |
Print cache to standard output.
Reimplemented in Rcuxx::RcuACL, and Rcuxx::RcuSTATUS.
const std::string& Rcuxx::RcuMemory::Name | ( | ) | const [inline] |
virtual bool Rcuxx::RcuMemory::IsWriteable | ( | ) | const [inline, virtual] |
virtual bool Rcuxx::RcuMemory::IsClearable | ( | ) | const [inline, virtual] |
virtual bool Rcuxx::RcuMemory::IsExecutable | ( | ) | const [inline, virtual] |
Rcu& Rcuxx::RcuMemory::fRcu [protected] |
std::string Rcuxx::RcuMemory::fName [protected] |
unsigned int Rcuxx::RcuMemory::fBase [protected] |
Base address.
Referenced by Base(), Commit(), Rcuxx::RcuDMEM::Commit(), Update(), and Rcuxx::RcuDMEM::Update().
Cache_t Rcuxx::RcuMemory::fData [protected] |
Data buffer.
Referenced by Rcuxx::RcuHEADER::Attributes(), Rcuxx::RcuHEADER::BlockLength(), Rcuxx::RcuHEADER::BunchCrossing(), Commit(), Rcuxx::RcuDMEM::Commit(), Rcuxx::RcuACL::Commit(), Data(), Rcuxx::RcuACL::Data(), Rcuxx::RcuIMEM::Execute(), Rcuxx::RcuRMEM::FecRead(), Rcuxx::RcuRMEM::FecWrite(), Rcuxx::RcuHEADER::FormatVersion(), Get(), Rcuxx::RcuHEADER::L1Message(), Load(), Rcuxx::RcuHEADER::MiniBunchCrossing(), Rcuxx::RcuHEADER::Orbit(), Print(), Rcuxx::RcuHEADER::RcuHEADER(), Rcuxx::RcuHEADER::RegionOfIntrest(), Save(), Set(), Rcuxx::RcuHEADER::SetAttributes(), Rcuxx::RcuHEADER::SetBlockLength(), Rcuxx::RcuHEADER::SetBunchCrossing(), Rcuxx::RcuHEADER::SetFormatVersion(), Rcuxx::RcuHEADER::SetL1Message(), Rcuxx::RcuHEADER::SetMiniBunchCrossing(), Rcuxx::RcuHEADER::SetOrbit(), Rcuxx::RcuHEADER::SetRegionOfIntrest(), Rcuxx::RcuHEADER::SetStatusErrors(), Rcuxx::RcuHEADER::SetSubDetectors(), Rcuxx::RcuHEADER::SetTriggerClasses(), Rcuxx::RcuHEADER::StatusErrors(), Rcuxx::RcuHEADER::SubDetectors(), Rcuxx::RcuHEADER::TriggerClasses(), Rcuxx::RcuSTATUS::Update(), Update(), Rcuxx::RcuDMEM::Update(), Rcuxx::RcuACL::Update(), and Zero().
unsigned int Rcuxx::RcuMemory::fSize [protected] |
Size of the memory.
Referenced by Commit(), Rcuxx::RcuDMEM::Commit(), Rcuxx::RcuACL::Commit(), Size(), Rcuxx::RcuSTATUS::Update(), Update(), Rcuxx::RcuDMEM::Update(), and Rcuxx::RcuACL::Update().
unsigned int Rcuxx::RcuMemory::fMax [protected] |
bool Rcuxx::RcuMemory::fWriteable [protected] |
RcuCommand* Rcuxx::RcuMemory::fClear [protected] |
RcuCommand* Rcuxx::RcuMemory::fExec [protected] |
RcuCommand* Rcuxx::RcuMemory::fAbort [protected] |
Top of page | Last update Wed Jun 4 00:51:26 2008 |
Copyright © 2004 Christian Holm | Created by DoxyGen 1.5.6 |