19 #include <boost/test/unit_test.hpp>
31 BOOST_AUTO_TEST_SUITE(physical)
33 BOOST_AUTO_TEST_SUITE(moduletransformer)
46 bool inKeepRouting = false);
49 bool inKeepRouting = false);
62 std::fstream fileStream(originalPath.string().c_str());
64 BOOST_REQUIRE(fileStream.good());
67 importer(fileStream, originalPath.string());
71 BOOST_REQUIRE(designPtr.get() != 0);
83 BOOST_REQUIRE(instIter != inDesignPtr->instancesEnd());
85 instPtrVector.push_back(*instIter);
89 BOOST_REQUIRE(instIter != inDesignPtr->instancesEnd());
90 instPtrVector.push_back(*instIter);
104 BOOST_REQUIRE(modIter == inDesignPtr->modulesEnd());
108 BOOST_REQUIRE(instIter == inDesignPtr->instancesEnd());
130 BOOST_REQUIRE(modIter != inDesignPtr->modulesEnd());
134 BOOST_REQUIRE(instIter != inDesignPtr->instancesEnd());
140 if(!inKeepPlacement) {
142 BOOST_REQUIRE_EQUAL(instPtr->getTile().compare(
""), 0);
143 BOOST_REQUIRE_EQUAL(instPtr->getSite().compare(
""), 0);
153 while(inInstanceVectorBegin != inInstanceVectorEnd) {
157 instIter = inDesignPtr->findInstance(instPtr->getName());
159 BOOST_REQUIRE(instIter == inDesignPtr->instancesEnd());
161 instIter = modPtr->findInstance(instPtr->getName());
163 BOOST_REQUIRE(instIter != modPtr->instancesEnd());
167 if(!inKeepPlacement) {
169 BOOST_REQUIRE_EQUAL(modInstPtr->getTile().compare(
""), 0);
170 BOOST_REQUIRE_EQUAL(modInstPtr->getSite().compare(
""), 0);
173 inInstanceVectorBegin++;
183 while(moduleNetsBegin != moduleNetsEnd) {
188 BOOST_REQUIRE(moduleNetPtr->pipsBegin() == moduleNetPtr->pipsEnd());
193 BOOST_REQUIRE(designNetItr == inDesignPtr->netsEnd());
201 u_int32_t portCount = 0;
211 while(designNetsBegin != designNetsEnd) {
219 while(designNetSourcesBegin != designNetSourcesEnd) {
225 if(pinInstPtr == instPtr) {
228 BOOST_REQUIRE(designNetPtr->pipsBegin() == designNetPtr->pipsEnd());
233 designNetSourcesBegin++;
240 while(designNetSinksBegin != designNetSinksEnd) {
246 if(pinInstPtr == instPtr) {
249 BOOST_REQUIRE(designNetPtr->pipsBegin() == designNetPtr->pipsEnd());
254 designNetSinksBegin++;
261 BOOST_REQUIRE_EQUAL(modPtr->getPortCount(), portCount);
274 BOOST_REQUIRE(modIter != inDesignPtr->modulesEnd());
278 BOOST_REQUIRE(instIter != inDesignPtr->instancesEnd());
292 bool inKeepRouting) {
297 BOOST_REQUIRE(modIter != inDesignPtr->modulesEnd());
302 BOOST_REQUIRE(designInstIter == inDesignPtr->instancesEnd());
313 while(modInstancesBegin != modInstancesEnd) {
320 BOOST_REQUIRE(designInstIter != inDesignPtr->instancesEnd());
322 if(!inKeepPlacement) {
326 BOOST_REQUIRE_EQUAL(instPtr->getTile().compare(
""), 0);
327 BOOST_REQUIRE_EQUAL(instPtr->getSite().compare(
""), 0);
340 while(moduleNetsBegin != moduleNetsEnd) {
347 BOOST_REQUIRE(designNetIter != inDesignPtr->netsEnd());
352 BOOST_REQUIRE(designNetPtr->pipsBegin() == designNetPtr->pipsEnd());
365 while(designNetsBegin != designNetsEnd) {
373 while(designNetSourcesBegin != designNetSourcesEnd) {
386 BOOST_REQUIRE(designNetPtr->pipsBegin() == designNetPtr->pipsEnd());
390 designNetSourcesBegin++;
397 while(designNetSinksBegin != designNetSinksEnd) {
409 BOOST_REQUIRE(designNetPtr->pipsBegin() == designNetPtr->pipsEnd());
413 designNetSinksBegin++;
617 BOOST_AUTO_TEST_SUITE_END()
619 BOOST_AUTO_TEST_SUITE_END()
void postModularizationVerifications(DesignSharedPtr inDesignPtr, InstanceSharedPtrVector inInstanceVector, bool inKeepPlacement=false, bool inKeepRouting=false)
Perform post-modularization tests on a design.
static const string sModuleDefinition
std::vector< InstanceSharedPtr > InstanceSharedPtrVector
Vector of Instance shared pointers.
DesignSharedPtr getDesignPtr(void)
Returns a shared pointer for the design.
Header for the DirectoryTree class.
InstancePinSharedPtrVector::iterator InstancePinSharedPtrIterator
Non-constant iterator to InstancePin shared pointer objects.
InstanceSharedPtrVector::const_iterator InstanceSharedPtrConstIterator
Constant iterator to Instance shared pointers.
void postFlatteningVerifications(DesignSharedPtr inDesignPtr, bool inKeepPlacement=false, bool inKeepRouting=false)
Perform post-flattening tests on a design.
boost::shared_ptr< class InstancePin > InstancePinSharedPtr
Shared pointer encapsulation of an InstancePin.
BOOST_AUTO_TEST_CASE(XdlUnpackUnitTest)
Unit test for the XdlUnpack class.
static const string sModuleInstanceName
boost::shared_ptr< Module > ModuleSharedPtr
Shared pointer encapsulation of a Module.
Header for the XdlImporter class.
Header for the XdlExport class.
Header for the Design class.
static const string sInstanceOneName
boost::shared_ptr< Net > NetSharedPtr
Shared pointer encapsulation of a Net.
boost::filesystem::path path
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
NetSharedPtrVector::iterator NetSharedPtrIterator
Non-constant iterator to Net shared pointers.
Importer from XDL format into a physical design.
ModuleSharedPtrVector::iterator ModuleSharedPtrIterator
Non-constant iterator for Module shared pointers.
DesignSharedPtr verifyDesignOpenedSuccessfully(const string &inDesignFileName)
Verify that the design file opened successfully.
void preModularizationVerifications(DesignSharedPtr inDesignPtr)
Perform pre-modularization tests on a design.
Header for the Factory class.
InstanceSharedPtrVector getInstancesToModularize(DesignSharedPtr inDesignPtr)
Retrieve the instances to modularize from the design and return them in a vector. ...
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.
void preFlatteningVerifications(DesignSharedPtr inDesignPtr)
Perform pre-flattening tests on a design.
InstanceSharedPtrVector::iterator InstanceSharedPtrIterator
Non-constant iterator to Instance shared pointers.
static const string sHierarchySeparator
static const string sInstanceTwoName