19 #include <boost/test/unit_test.hpp>
32 BOOST_AUTO_TEST_SUITE(bitstream)
44 BOOST_CHECK_EQUAL(mask, 0xFFFFu);
48 BOOST_CHECK_EQUAL(mask, 0xFFE0u);
51 BOOST_CHECK_EQUAL(mask, 0xFFFFu);
54 BOOST_CHECK_EQUAL(mask, 0xC1FFu);
130 /
"torc" /
"bitstream" /
"Spartan6UnitTest.reference.bit";
132 /
"regression" /
"Spartan6UnitTest.generated.bit";
135 std::fstream fileStream(referencePath.string().c_str(), std::ios::binary | std::ios::in);
137 BOOST_REQUIRE(fileStream.good());
139 bitstream.
read(fileStream,
false);
143 std::string designName = bitstream.getDesignName();
144 std::string deviceName = bitstream.getDeviceName();
145 std::string designDate = bitstream.getDesignDate();
146 std::string designTime = bitstream.getDesignTime();
148 std::cout <<
"family of " << deviceName <<
" is " << deviceDesignator.
getFamily() << std::endl;
151 std::fstream outputStream(generatedPath.string().c_str(), std::ios::binary | std::ios::out);
152 BOOST_REQUIRE(outputStream.good());
153 bitstream.write(outputStream);
154 outputStream.flush();
160 BOOST_AUTO_TEST_SUITE_END()
Header for torc::bitstream output stream helpers.
static const char * sCommandName[eCommandCount]
Configuration command names.
static const char * sOpcodeName[eOpcodeCount]
Packet opcode names.
Encapsulation of a device designator and its constituent elements.
const EFamily & getFamily(void) const
Returns the device family.
Header for the DirectoryTree class.
Header for the DeviceDesignator class.
Header for Boost.Test helper functions.
Header for the Spartan6 class.
static const char * sRegisterName[eRegisterCount]
Configuration register names.
static const char * sPacketTypeName[ePacketTypeCount]
Packet type names.
boost::filesystem::path path
Header for the DDB class.
bool fileContentsAreEqual(const boost::filesystem::path &inA, const boost::filesystem::path &inB)
Compare the raw contents of two files to determine whether they are identical.
BOOST_AUTO_TEST_CASE(hexCharacterToDec)
virtual void read(std::istream &inStream, bool inCleanDateAndTime=true)
Read the bitstream header and packets from a stream.
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.