19 #include <boost/test/unit_test.hpp>
30 BOOST_AUTO_TEST_SUITE(bitstream)
37 /
"torc" /
"bitstream" /
"Virtex4UnitTest.reference.bit";
39 /
"regression" /
"VirtexPacketUnitTest.generated.bit";
42 std::fstream fileStream(referencePath.string().c_str(), std::ios::binary | std::ios::in);
43 BOOST_REQUIRE(fileStream.good());
50 uint32_t bitstreamWordLength = bitstream.getBitstreamByteLength() >> 2;
51 std::cout << bitstream << std::endl;
54 uint32_t cumulativeWordLength = 0;
55 std::vector<VirtexPacket> packets;
56 while(cumulativeWordLength < bitstreamWordLength) {
58 packets.push_back(packet);
62 cumulativeWordLength = 0;
63 std::vector<VirtexPacket>::iterator p = packets.begin();
64 std::vector<VirtexPacket>::iterator e = packets.end();
72 BOOST_AUTO_TEST_SUITE_END()
static bool readHeader(std::istream &inStream, string &outDesignName, string &outDeviceName, string &outDesignDate, string &outDesignTime, uint32_t &outBitstreamLength, uint32_t &outHeaderLength)
Read a bitstream header, and return its fields.
Header for the Virtex4 class.
Header for the DirectoryTree class.
uint32_t getWordSize(void) const
Returns the total number of words in the packet, including the header word.
boost::filesystem::path path
Header for the VirtexPacket class.
static VirtexPacket read(std::istream &inStream)
Read a packet.
Bitstream packet for Virtex class architectures.
BOOST_AUTO_TEST_CASE(hexCharacterToDec)
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.