torc-master
|
Bitstream packet for Spartan 16 bit class architectures. More...
#include <Spartan6Packet.hpp>
Public Types | |
enum | EPacketType { ePacketType1 = 1, ePacketType2, ePacketTypeCount = 8 } |
Packet type enumeration. More... | |
enum | EOpcode { eOpcodeNOP = 0, eOpcodeRead, eOpcodeWrite, eOpcodeReserved, eOpcodeCount } |
Packet opcode enumeration. More... | |
enum | EPacket { ePacketMaskType = 0xe000, ePacketShiftType = 13, ePacketMaskOpcode = 0x1800, ePacketShiftOpcode = 11, ePacketMaskTypeAddress = 0x07e0, ePacketShiftTypeAddress = 5, ePacketMaskType1Count = 0x001f, ePacketShiftType1Count = 0, ePacketMaskType2Count0 = 0xffff, ePacketShiftType2Count0 = 0, ePacketMaskType2Count1 = 0xffff, ePacketShiftType2Count1 = 0 } |
Packet subfields. More... | |
enum | ESynchronization { eSynchronizationDummy = 0xffff, eSynchronizationSync0 = 0xaa99, eSynchronizationSync1 = 0x5566, eSynchronizationBusWidthSync0 = 0x0000, eSynchronizationBusWidthSync1 = 0x00bb, eSynchronizationBusWidthDetect0 = 0x1122, eSynchronizationBusWidthDetect1 = 0x0044 } |
Synchronization words. More... | |
Public Member Functions | |
Spartan6Packet (void) | |
Null constructor. More... | |
Spartan6Packet (uint16_t inHeader, uint32_t inCount, uint16_t inWord, uint16_t *inWords) | |
Full constructor. More... | |
Spartan6Packet (uint16_t inHeader, uint16_t inWord) | |
Header plus single word constructor. More... | |
Spartan6Packet (uint16_t inHeader) | |
Header only constructor. More... | |
Spartan6Packet (const Spartan6Packet &rhs) | |
Copy constructor. More... | |
void | write (std::ostream &inStream) const |
Write a packet. More... | |
uint16_t | operator[] (size_t inIndex) const |
EPacketType | getType (void) const |
EOpcode | getOpcode (void) const |
int | getAddress (void) const |
uint16_t | getHeader (void) const |
uint32_t | getWordCount (void) const |
Returns the number of payload words in the packet, excluding the header word. More... | |
uint32_t | getWordSize (void) const |
Returns the total number of words in the packet, including the header word. In the case of Type 2 packets, we also include the two implicity length words. More... | |
const WordSharedArray | getWords (void) const |
brief Returns the raw packet words, including the header word. More... | |
bool | isType1 (void) const |
bool | isType2 (void) const |
bool | isNop (void) const |
bool | isReserved (void) const |
bool | isRead (void) const |
bool | isWrite (void) const |
bool | isDummyWord (void) const |
bool | isSyncWord0 (void) const |
bool | isSyncWord1 (void) const |
bool | isBusWidthSyncWord0 (void) const |
bool | isBusWidthSyncWord1 (void) const |
bool | isBusWidthDetectWord0 (void) const |
bool | isBusWidthDetectWord1 (void) const |
Static Public Member Functions | |
static Spartan6Packet | read (std::istream &inStream) |
Read a packet. More... | |
static Spartan6Packet | makeType1Write (uint16_t inAddress, uint16_t inWord) |
Construct a type 1 write packet. More... | |
static Spartan6Packet | makeType1Write32 (uint16_t inAddress, uint32_t inWord) |
Construct a type 1 write packet for two words. More... | |
static Spartan6Packet | makeType1Write (uint16_t inAddress, uint16_t inWord1, uint16_t inWord2) |
Construct a type 1 write packet for two words. More... | |
static Spartan6Packet | makeType1Write (uint32_t inCount, uint16_t inAddress, uint16_t *inWords) |
Construct a type 1 write packet for multiple words. More... | |
static Spartan6Packet | makeType2Write (uint32_t inCount, uint16_t inAddress, uint16_t *inWords) |
Construct a type 2 write packet. More... | |
static uint16_t | makeHeader (EPacketType inType, EOpcode inOpcode, uint16_t inAddress, uint32_t inCount) |
Construct a packet header. More... | |
Data Fields | |
uint16_t | mHeader |
uint32_t | mCount |
uint16_t | mWord |
WordSharedArray | mWords |
EPacketType | mType |
EOpcode | mOpcode |
int | mAddress |
Static Public Attributes | |
static const char * | sPacketTypeName [ePacketTypeCount] |
Packet type names. More... | |
static const char * | sOpcodeName [eOpcodeCount] |
Packet opcode names. More... | |
Protected Types | |
typedef boost::uint16_t | uint16_t |
Imported type name. More... | |
typedef boost::uint32_t | uint32_t |
typedef boost::shared_array < uint16_t > | WordSharedArray |
Word shared array type. More... | |
Protected Member Functions | |
void | initialize (void) |
Friends | |
class | torc::bitstream::bitstream::Spartan6PacketUnitTest |
Bitstream packet for Spartan 16 bit class architectures.
Definition at line 75 of file Spartan6Packet.hpp.
|
protected |
Imported type name.
Definition at line 80 of file Spartan6Packet.hpp.
|
protected |
Definition at line 81 of file Spartan6Packet.hpp.
|
protected |
Word shared array type.
Definition at line 83 of file Spartan6Packet.hpp.
|
inherited |
Packet opcode enumeration.
Enumerator | |
---|---|
eOpcodeNOP | |
eOpcodeRead | |
eOpcodeWrite | |
eOpcodeReserved | |
eOpcodeCount |
Definition at line 44 of file Spartan6Packet.hpp.
|
inherited |
Packet subfields.
Definition at line 49 of file Spartan6Packet.hpp.
|
inherited |
Packet type enumeration.
Enumerator | |
---|---|
ePacketType1 | |
ePacketType2 | |
ePacketTypeCount |
Definition at line 40 of file Spartan6Packet.hpp.
|
inherited |
Synchronization words.
Enumerator | |
---|---|
eSynchronizationDummy | |
eSynchronizationSync0 | |
eSynchronizationSync1 | |
eSynchronizationBusWidthSync0 | |
eSynchronizationBusWidthSync1 | |
eSynchronizationBusWidthDetect0 | |
eSynchronizationBusWidthDetect1 |
Definition at line 63 of file Spartan6Packet.hpp.
|
inline |
Null constructor.
Definition at line 107 of file Spartan6Packet.hpp.
|
inline |
Full constructor.
Definition at line 110 of file Spartan6Packet.hpp.
Header plus single word constructor.
Definition at line 116 of file Spartan6Packet.hpp.
|
inline |
Header only constructor.
Definition at line 121 of file Spartan6Packet.hpp.
|
inline |
Copy constructor.
Definition at line 126 of file Spartan6Packet.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the number of payload words in the packet, excluding the header word.
Definition at line 285 of file Spartan6Packet.hpp.
|
inline |
brief Returns the raw packet words, including the header word.
Definition at line 293 of file Spartan6Packet.hpp.
|
inline |
Returns the total number of words in the packet, including the header word. In the case of Type 2 packets, we also include the two implicity length words.
Definition at line 288 of file Spartan6Packet.hpp.
|
inlineprotected |
Definition at line 85 of file Spartan6Packet.hpp.
|
inline |
Definition at line 306 of file Spartan6Packet.hpp.
|
inline |
Definition at line 308 of file Spartan6Packet.hpp.
|
inline |
Definition at line 304 of file Spartan6Packet.hpp.
|
inline |
Definition at line 305 of file Spartan6Packet.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 295 of file Spartan6Packet.hpp.
|
inline |
|
inline |
|
inlinestatic |
Construct a packet header.
Definition at line 254 of file Spartan6Packet.hpp.
|
inlinestatic |
Construct a type 1 write packet.
Definition at line 218 of file Spartan6Packet.hpp.
|
inlinestatic |
Construct a type 1 write packet for two words.
Definition at line 232 of file Spartan6Packet.hpp.
|
inlinestatic |
Construct a type 1 write packet for multiple words.
Definition at line 242 of file Spartan6Packet.hpp.
|
inlinestatic |
Construct a type 1 write packet for two words.
Definition at line 223 of file Spartan6Packet.hpp.
|
inlinestatic |
Construct a type 2 write packet.
Definition at line 248 of file Spartan6Packet.hpp.
|
inline |
Definition at line 273 of file Spartan6Packet.hpp.
|
inlinestatic |
Read a packet.
Definition at line 132 of file Spartan6Packet.hpp.
|
inline |
Write a packet.
Definition at line 199 of file Spartan6Packet.hpp.
|
friend |
Definition at line 76 of file Spartan6Packet.hpp.
int torc::bitstream::Spartan6Packet::mAddress |
Definition at line 99 of file Spartan6Packet.hpp.
uint32_t torc::bitstream::Spartan6Packet::mCount |
Definition at line 94 of file Spartan6Packet.hpp.
uint16_t torc::bitstream::Spartan6Packet::mHeader |
Definition at line 93 of file Spartan6Packet.hpp.
EOpcode torc::bitstream::Spartan6Packet::mOpcode |
Definition at line 98 of file Spartan6Packet.hpp.
EPacketType torc::bitstream::Spartan6Packet::mType |
Definition at line 97 of file Spartan6Packet.hpp.
uint16_t torc::bitstream::Spartan6Packet::mWord |
Definition at line 95 of file Spartan6Packet.hpp.
WordSharedArray torc::bitstream::Spartan6Packet::mWords |
Definition at line 96 of file Spartan6Packet.hpp.
|
static |
Packet opcode names.
Definition at line 103 of file Spartan6Packet.hpp.
|
static |
Packet type names.
Definition at line 101 of file Spartan6Packet.hpp.