19 #include <boost/test/unit_test.hpp>
30 BOOST_AUTO_TEST_SUITE(bitstream)
36 /
"torc" /
"bitstream" /
"Spartan6UnitTest.reference.bit";
38 /
"regression" /
"Spartan6PacketUnitTest.generated.bit";
41 std::fstream fileStream(referencePath.string().c_str(), std::ios::binary | std::ios::in);
42 BOOST_REQUIRE(fileStream.good());
49 uint32_t bitstreamWordLength = bitstream.getBitstreamByteLength() >> 2;
50 std::cout << bitstream << std::endl;
53 uint32_t cumulativeWordLength = 0;
54 std::vector<Spartan6Packet> packets;
55 while(cumulativeWordLength < bitstreamWordLength) {
57 packets.push_back(packet);
61 cumulativeWordLength = 0;
62 std::vector<Spartan6Packet>::iterator p = packets.begin();
63 std::vector<Spartan6Packet>::iterator e = packets.end();
71 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 DirectoryTree class.
Bitstream packet for Spartan 16 bit class architectures.
Header for the Spartan6 class.
uint32_t getWordSize(void) const
Returns the total number of words in the packet, including the header word. In the case of Type 2 pa...
boost::filesystem::path path
Header for the Spartan6Packet class.
BOOST_AUTO_TEST_CASE(hexCharacterToDec)
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.
static Spartan6Packet read(std::istream &inStream)
Read a packet.