MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions
MFM::P3Atom< PC > Class Template Reference
Inheritance diagram for MFM::P3Atom< PC >:
MFM::Atom< CoreConfig< P3Atom< PC >, PC > >

Public Types

enum  { ATOM_CATEGORY = 3 }
 
enum  {
  BITS = PC::BITS_PER_ATOM, P3_ECC_BITS_POS = 0, P3_ECC_BITS_LEN = 9, P3_TYPE_BITS_POS = P3_ECC_BITS_POS + P3_ECC_BITS_LEN,
  P3_TYPE_BITS_LEN = 16, P3_FIXED_HEADER_POS = P3_ECC_BITS_POS, P3_FIXED_HEADER_LEN = P3_ECC_BITS_LEN + P3_TYPE_BITS_LEN, P3_STATE_BITS_POS = P3_FIXED_HEADER_POS + P3_FIXED_HEADER_LEN,
  P3_STATE_BITS_LEN = BITS - P3_STATE_BITS_POS, ATOM_FIRST_STATE_BIT = P3_STATE_BITS_POS, P3_TYPE_COUNT = 1<<P3_TYPE_BITS_LEN
}
 
typedef BitField< BitVector
< BITS >, VD::U32,
P3_FIXED_HEADER_LEN,
P3_FIXED_HEADER_POS > 
AFFixedHeader
 
typedef BitField< BitVector
< BITS >, VD::U32,
P3_TYPE_BITS_LEN,
P3_TYPE_BITS_POS > 
AFTypeBits
 
typedef BitField< BitVector
< BITS >, VD::U32,
P3_ECC_BITS_LEN,
P3_ECC_BITS_POS > 
AFECCBits
 

Public Member Functions

 P3Atom (u32 type=0, u32 z1=0, u32 z2=0, u32 stateBits=0)
 
u32 GetTypeImpl () const
 
bool IsSaneImpl () const
 
bool HasBeenRepairedImpl ()
 
u32 GetMaxStateSize (u32 type) const
 
u32 EndStateBit () const
 
void WriteStateBitsImpl (ByteSink &ostream) const
 
void ReadStateBitsImpl (const char *stateStr)
 
void ReadStateBitsImpl (const BitVector< BITS > &bv)
 
u32 GetStateField (u32 stateIndex, u32 stateWidth) const
 
void SetStateField (u32 stateIndex, u32 stateWidth, u32 value)
 
void PrintBits (ByteSink &ostream) const
 
void PrintImpl (ByteSink &ostream) const
 
P3Atomoperator= (const P3Atom &rhs)
 
- Public Member Functions inherited from MFM::Atom< CoreConfig< P3Atom< PC >, PC > >
bool IsSane () const
 
bool HasBeenRepaired ()
 
u32 GetType () const
 
void Print (ByteSink &ostream) const
 
void WriteStateBits (ByteSink &ostream) const
 
void ReadStateBits (const char *hexStr)
 
void ReadStateBits (const BitVector< BPA > &bv)
 
void WriteBits (ByteSink &ostream) const
 
void ReadBits (const char *hexStr)
 
void XRay (Random &rand, u32 bitOdds)
 
bool operator== (const Atom &rhs) const
 
bool operator!= (const Atom &rhs) const
 

Protected Member Functions

void SetType (u32 type)
 

Additional Inherited Members

- Static Public Member Functions inherited from MFM::Atom< CoreConfig< P3Atom< PC >, PC > >
static bool IsType (const T &atom, u32 type)
 
static bool IsSameType (const T &atom, const T &other)
 
- Protected Attributes inherited from MFM::Atom< CoreConfig< P3Atom< PC >, PC > >
BitVector< BPA > m_bits
 

Member Function Documentation

template<class PC>
u32 MFM::P3Atom< PC >::EndStateBit ( ) const
inline

Index of first bit that isn't a state bit.

template<class PC>
u32 MFM::P3Atom< PC >::GetStateField ( u32  stateIndex,
u32  stateWidth 
) const
inline

Read stateWidth state bits starting at stateIndex, which counts toward the right with 0 meaning the leftmost state bit.

template<class PC>
void MFM::P3Atom< PC >::SetStateField ( u32  stateIndex,
u32  stateWidth,
u32  value 
)
inline

Store value into stateWidth state bits starting at stateIndex, which counts toward the right with 0 meaning the leftmost state bit.


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