#include <Spartan6Packet.hpp>


Public Member Functions | |
| Spartan6Packet (void) | |
| Null constructor. | |
| Spartan6Packet (uint16_t inHeader, uint32_t inCount, uint16_t inWord, uint16_t *inWords) | |
| Full constructor. | |
| Spartan6Packet (uint16_t inHeader, uint16_t inWord) | |
| Header plus single word constructor. | |
| Spartan6Packet (uint16_t inHeader) | |
| Header only constructor. | |
| Spartan6Packet (const Spartan6Packet &rhs) | |
| Copy constructor. | |
| void | write (std::ostream &inStream) const |
| Write a packet. | |
| 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. | |
| 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. | |
| const WordSharedArray | getWords (void) const |
| brief Returns the raw packet words, including the header word. | |
| 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. | |
| static Spartan6Packet | makeNullType2Write (uint16_t inAddress) |
| Construct a null type 1 write packet. | |
| static Spartan6Packet | makeType1Write (uint16_t inAddress, uint16_t inWord) |
| Construct a type 1 write packet. | |
| static Spartan6Packet | makeType1Write32 (uint16_t inAddress, uint32_t inWord) |
| Construct a type 1 write packet for two words. | |
| static Spartan6Packet | makeType1Write (uint16_t inAddress, uint16_t inWord1, uint16_t inWord2) |
| Construct a type 1 write packet for two words. | |
| static Spartan6Packet | makeType1Write (uint32_t inCount, uint16_t inAddress, uint16_t *inWords) |
| Construct a type 1 write packet for multiple words. | |
| static Spartan6Packet | makeType2Write (uint32_t inCount, uint16_t inAddress, uint16_t *inWords) |
| Construct a type 2 write packet. | |
| static uint16_t | makeHeader (EPacketType inType, EOpcode inOpcode, uint16_t inAddress, uint32_t inCount) |
| Construct a packet header. | |
Public Attributes | |
| 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. | |
| static const char * | sOpcodeName [eOpcodeCount] |
| Packet opcode names. | |
Protected Types | |
| typedef boost::uint16_t | uint16_t |
| Imported type name. | |
| typedef boost::uint32_t | uint32_t |
| typedef boost::shared_array < uint16_t > | WordSharedArray |
| Word shared array type. | |
Protected Member Functions | |
| void | initialize (void) |
Friends | |
| class | torc::bitstream::bitstream::Spartan6PacketUnitTest |
Definition at line 75 of file Spartan6Packet.hpp.
typedef boost::uint16_t torc::bitstream::Spartan6Packet::uint16_t [protected] |
typedef boost::shared_array<uint16_t> torc::bitstream::Spartan6Packet::WordSharedArray [protected] |
| torc::bitstream::Spartan6Packet::Spartan6Packet | ( | void | ) | [inline] |
| torc::bitstream::Spartan6Packet::Spartan6Packet | ( | uint16_t | inHeader | ) | [inline] |
| torc::bitstream::Spartan6Packet::Spartan6Packet | ( | const Spartan6Packet & | rhs | ) | [inline] |
| static Spartan6Packet torc::bitstream::Spartan6Packet::read | ( | std::istream & | inStream | ) | [inline, static] |
Read a packet.
Definition at line 132 of file Spartan6Packet.hpp.
| void torc::bitstream::Spartan6Packet::write | ( | std::ostream & | inStream | ) | const [inline] |
| static Spartan6Packet torc::bitstream::Spartan6Packet::makeNullType2Write | ( | uint16_t | inAddress | ) | [inline, static] |
Construct a null type 1 write packet.
A type 2 write packet to the FDRI register is generally only useful to specify the current register in preparation for a type 2 write. The type 2 write header includes a size but specifies no target register, hence the prior null type 2 packet.
Definition at line 222 of file Spartan6Packet.hpp.
| static Spartan6Packet torc::bitstream::Spartan6Packet::makeType1Write | ( | uint16_t | inAddress, | |
| uint16_t | inWord | |||
| ) | [inline, static] |
| static Spartan6Packet torc::bitstream::Spartan6Packet::makeType1Write32 | ( | uint16_t | inAddress, | |
| uint32_t | inWord | |||
| ) | [inline, static] |
| static Spartan6Packet torc::bitstream::Spartan6Packet::makeType1Write | ( | uint16_t | inAddress, | |
| uint16_t | inWord1, | |||
| uint16_t | inWord2 | |||
| ) | [inline, static] |
| static Spartan6Packet torc::bitstream::Spartan6Packet::makeType1Write | ( | uint32_t | inCount, | |
| uint16_t | inAddress, | |||
| uint16_t * | inWords | |||
| ) | [inline, static] |
Construct a type 1 write packet for multiple words.
Definition at line 246 of file Spartan6Packet.hpp.
| static Spartan6Packet torc::bitstream::Spartan6Packet::makeType2Write | ( | uint32_t | inCount, | |
| uint16_t | inAddress, | |||
| uint16_t * | inWords | |||
| ) | [inline, static] |
| static uint16_t torc::bitstream::Spartan6Packet::makeHeader | ( | EPacketType | inType, | |
| EOpcode | inOpcode, | |||
| uint16_t | inAddress, | |||
| uint32_t | inCount | |||
| ) | [inline, static] |
Construct a packet header.
Definition at line 262 of file Spartan6Packet.hpp.
| uint32_t torc::bitstream::Spartan6Packet::getWordCount | ( | void | ) | const [inline] |
Returns the number of payload words in the packet, excluding the header word.
Definition at line 293 of file Spartan6Packet.hpp.
| uint32_t torc::bitstream::Spartan6Packet::getWordSize | ( | void | ) | const [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 296 of file Spartan6Packet.hpp.
| const WordSharedArray torc::bitstream::Spartan6Packet::getWords | ( | void | ) | const [inline] |
brief Returns the raw packet words, including the header word.
Definition at line 301 of file Spartan6Packet.hpp.
const char * torc::bitstream::Spartan6Packet::sPacketTypeName [static] |
Initial value:
{
"[UNKNOWN TYPE 0]", "TYPE1", "TYPE2", "[UNKNOWN TYPE 3]", "[UNKNOWN TYPE 4]",
"[UNKNOWN TYPE 5]", "[UNKNOWN TYPE 6]", "[UNKNOWN TYPE 7]"
}
Definition at line 101 of file Spartan6Packet.hpp.
const char * torc::bitstream::Spartan6Packet::sOpcodeName [static] |
Initial value:
{
"NOP", "READ", "WRITE", "RESERVED"
}
Definition at line 103 of file Spartan6Packet.hpp.
1.5.6