Bitstream Interpretation Library (BIL)
0.1
|
Visitor for determining target device type of a Virtex-5 bitstream. More...
#include <bitstream/V5BitstreamDeviceDetector.hpp>
Public Member Functions | |
V5BitstreamDeviceDetector () | |
DeviceID::ID_t | deviceID () const |
Gets the detected device ID. | |
virtual void | reset () |
Resets the syntax checker and the device ID. | |
virtual void | visit (const Type1Packet &type1Packet) |
Checks a Type1Packet packet for device ID data. | |
virtual void | visit (const Type2Packet &type2Packet) |
Checks a Type2Packet packet for device ID data. | |
Public Member Functions inherited from bil::V5BitstreamSyntaxChecker | |
V5BitstreamSyntaxChecker () | |
bool | behindSyncWord () const |
Tells, if sync word was passed. | |
bool | lastPacketWasType1 () const |
Tells, if the last packet processed was a type 1 packet. | |
RegisterAddress::address_t | lastType1Address () const |
Gets the register address of the last processed type 1 packet. | |
virtual void | visit (const BuswidthPattern &buswidthPattern) |
Visits a BuswidthPattern packet. | |
virtual void | visit (const DummyWord &dummyWord) |
Visits a DummyWord packet. | |
virtual void | visit (const SyncWord &syncWord) |
Visits a SyncWord packet. | |
Public Member Functions inherited from bil::V5PacketVisitor | |
virtual void | visit (const Packet &packet) |
Irrelevant visit() method for Virtex-5 bitstreams. | |
Public Member Functions inherited from bil::PacketVisitor | |
virtual | ~PacketVisitor () |
Protected Member Functions | |
void | checkDeviceID (const Type2Packet &type2Packet) |
Tests if packet contains a device ID. If so, the ID is tested against previous written IDs (if there are previous writes, all IDs must be equal) and stored. |
Visitor for determining target device type of a Virtex-5 bitstream.
This visitor is derived from V5BitstreamSyntaxChecker, because when visiting a bitstream and trying to detect its target device type this bitstream has to be at least syntactical correct. The detection itself relies on the presence of a write into the IDCODE register, which tells the ID of the device the bitstream is for. If multiple IDCODE writes are present, thats no problem, unless they all write the same device ID; otherwise an exception will be thrown.
Definition at line 30 of file V5BitstreamDeviceDetector.hpp.
V5BitstreamDeviceDetector::V5BitstreamDeviceDetector | ( | ) |
Definition at line 14 of file V5BitstreamDeviceDetector.cpp.
DeviceID::ID_t V5BitstreamDeviceDetector::deviceID | ( | ) | const |
Gets the detected device ID.
This method will return 0, if reset() was called directly before; or if no IDCODE command was found in the visited bitstream.
Definition at line 20 of file V5BitstreamDeviceDetector.cpp.
|
virtual |
Resets the syntax checker and the device ID.
Reimplemented from bil::V5BitstreamSyntaxChecker.
Definition at line 26 of file V5BitstreamDeviceDetector.cpp.
|
virtual |
Checks a Type1Packet packet for device ID data.
type1Packet | Type1Packet instance to be visited. |
. |
Reimplemented from bil::V5BitstreamSyntaxChecker.
Definition at line 33 of file V5BitstreamDeviceDetector.cpp.
|
virtual |
Checks a Type2Packet packet for device ID data.
type2Packet | Type2Packet instance to be visited. |
. |
Reimplemented from bil::V5BitstreamSyntaxChecker.
Definition at line 40 of file V5BitstreamDeviceDetector.cpp.
|
protected |
Tests if packet contains a device ID. If so, the ID is tested against previous written IDs (if there are previous writes, all IDs must be equal) and stored.
If the packet is a one word write to the IDCODE register, this word is the device ID.
type2Packet | The packet. |
. |
Definition at line 47 of file V5BitstreamDeviceDetector.cpp.