Skip to content
Permalink
Browse files

Merging sync_private

  • Loading branch information...
eder-matheus committed Apr 13, 2019
2 parents bada63f + 4d6cb45 commit d73ee870fb16f82c0838e41dc3c4da2484ada189
@@ -235,6 +235,7 @@ friend class PhysicalService;
DBUxy getSize() const;

//! @brief Returns the size of this instance.
//! @todo Rename to getSize().
DBU getSize(const Dimension dimension) const;

//! @brief Returns the area of this instance.
@@ -244,15 +245,18 @@ friend class PhysicalService;
DBUxy getPosition() const;

//! @brief Returns the lower-left position of this instance.
//! that is defined as its position.
DBU getPosition(const Dimension dim) const;

//! @brief Returns the lower-left/upper-right position of this instance.
//! @todo remove
DBUxy getCoordinate(const Boundary bound) const;

//! @brief Returns the lower-left/upper-right position of this instance.
//! @todo remove
DBU getCoordinate(const Boundary bound, const Dimension dim) const;

//! @brief Returns the center of this instance.
//! @brief Returns the central point of the PhysicalInstance boundaries.
DBUxy getCenter() const;

//! @brief Returns the center position in a given dimension.
@@ -295,4 +299,4 @@ friend class Design;
void setMacroBlock(const bool value);
}; // end class

} // end namespace
} // end namespace
@@ -128,7 +128,7 @@ friend class Arc;
//! @note This is a user-defined flag. If the flag was not set, an exception
//! is raised.
NetTypeTag getNetTypeTag() const;

//! @Author Mateus
//! @brief Returns the usage of the net
Use getUse() const;
@@ -509,12 +509,6 @@ inline DBU Instance::getSize(const Dimension dimension) const {

// -----------------------------------------------------------------------------

inline DBU Instance::getArea() const {
return data->clsBounds.computeArea();
} // end method

// -----------------------------------------------------------------------------

inline DBUxy Instance::getPosition() const {
if (isPort())
return data->clsPortPos;
@@ -547,6 +541,12 @@ inline DBU Instance::getCoordinate(const Boundary bound, const Dimension dim) co

// -----------------------------------------------------------------------------

inline DBU Instance::getArea() const {
return data->clsBounds.computeArea();
} // end method

// -----------------------------------------------------------------------------

inline DBUxy Instance::getCenter() const {
if (isPort())
return getPosition();
@@ -619,4 +619,4 @@ InstanceTag::setMacroBlock(const bool value) {
data->block = value;
} // end method

} // end namespace
} // end namespace
@@ -30,11 +30,11 @@ namespace Rsyn {

void Report::start(const Rsyn::Json &params) {
Rsyn::Session session;

if (session.isServiceRunning("rsyn.timer")) {
clsTimer = session.getService("rsyn.timer");
} // end if

clsTimer = session.getService("rsyn.timer");
clsLibraryCharacterizer = session.getService("rsyn.libraryCharacterizer");
clsRoutingEstimator = session.getService("rsyn.routingEstimator");
if (session.isServiceRunning("rsyn.libraryCharacterizer")) {
clsLibraryCharacterizer = session.getService("rsyn.libraryCharacterizer");
} // end if
@@ -631,4 +631,4 @@ void Report::reportTree(Rsyn::Net net) {
} // end method


} // end namespace
} // end namespace
@@ -982,9 +982,9 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs
via.clsYBottomEnclosure,
via.clsXTopEnclosure,
via.clsYTopEnclosure
);
);
CHECK_STATUS(status);

if (via.clsHasRowCol) {
status = defwViaViaruleRowCol(via.clsNumCutRows, via.clsNumCutCols);
CHECK_STATUS(status);
@@ -998,32 +998,32 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs
CHECK_STATUS(status);
} // end if
} else {
const std::map<std::string, std::deque < DefViaGeometryDscp>> &mapGeos = via.clsGeometries;
const std::map<std::string, std::deque<DefViaGeometryDscp>> & mapGeos = via.clsGeometries;
for (auto& pair : mapGeos) {
const std::string layer = pair.first;
const std::deque<DefViaGeometryDscp>& geometries = pair.second;
for (size_t i = 0; i < geometries.size(); i++) {
const DefViaGeometryDscp & geo = geometries[i];
if (geo.clsHasMask) {
defwViaRect(
layer.c_str(),
geo.clsBounds[LOWER][X],
geo.clsBounds[LOWER][Y],
geo.clsBounds[UPPER][X],
geo.clsBounds[UPPER][Y],
geo.clsMask);
layer.c_str(),
geo.clsBounds[LOWER][X],
geo.clsBounds[LOWER][Y],
geo.clsBounds[UPPER][X],
geo.clsBounds[UPPER][Y],
geo.clsMask);
} else {
defwViaRect(
layer.c_str(),
geo.clsBounds[LOWER][X],
geo.clsBounds[LOWER][Y],
geo.clsBounds[UPPER][X],
geo.clsBounds[UPPER][Y]);
layer.c_str(),
geo.clsBounds[LOWER][X],
geo.clsBounds[LOWER][Y],
geo.clsBounds[UPPER][X],
geo.clsBounds[UPPER][Y]);
}
}
}
} // end if

status = defwOneViaEnd();
CHECK_STATUS(status);
} // end for
@@ -1088,12 +1088,12 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs
if (numSpecialNets > 0) {
status = defwStartSpecialNets(numSpecialNets);
CHECK_STATUS(status);

// write nets
for (const DefSpecialNetDscp & defNet : defDscp.clsSpecialNets) {
status = defwSpecialNet(defNet.clsName.c_str());
CHECK_STATUS(status);

// Writing Net connections
for (const DefNetConnection & defConn : defNet.clsConnections) {
status = defwSpecialNetConnection(defConn.clsComponentName.c_str(), defConn.clsPinName.c_str(), 0);
@@ -1118,7 +1118,7 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs

status = defwSpecialNetPathLayer(segment.clsLayerName.c_str());
CHECK_STATUS(status);

status = defwSpecialNetPathWidth(segment.clsRoutedWidth);
CHECK_STATUS(status);
for (const DefRoutingPointDscp & pt : segment.clsRoutingPoints) {
@@ -1156,12 +1156,12 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs
status = defwSpecialNetPathEnd();
CHECK_STATUS(status);
} // end if

if (defNet.clsUse != INVALID_DEF_NAME) {
status = defwSpecialNetUse(defNet.clsUse.c_str());
CHECK_STATUS(status);
} // end if

status = defwSpecialNetEndOneNet();
CHECK_STATUS(status);
//CHECK_STATUS(status);
@@ -1170,12 +1170,12 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs
status = defwEndSpecialNets();
CHECK_STATUS(status);
} // end if

int numNets = defDscp.clsNets.size();
if (numNets > 0) {
status = defwStartNets(numNets);
CHECK_STATUS(status);


// write nets
for (const DefNetDscp & defNet : defDscp.clsNets) {
@@ -1236,16 +1236,16 @@ void DEFControlParser::writeFullDEF(const string &filename, const DefDscp &defDs
}
} // end for

} // end for
} // end for
status = defwNetPathEnd();
CHECK_STATUS(status);
} // end if

if (defNet.clsUse != INVALID_DEF_NAME) {
status = defwNetUse(defNet.clsUse.c_str());
status = defwNetPathEnd();
CHECK_STATUS(status);
} // end if

} // end if
status = defwNetEndOneNet();
CHECK_STATUS(status);
//CHECK_STATUS(status);
@@ -245,6 +245,17 @@ int lefPinCB(lefrCallbackType_e c, lefiPin* pin, lefiUserData ud) {
} // end if
// END WORKORUND to support tristate data pin

// Mateus @ 190108 -- WORKORUND to support tristate pin
if (lefPin.clsPinDirection.compare("OUTPUT TRISTATE") == 0) {
lefPin.clsPinDirection = "OUTPUT";
if (numWarningsTristatePins < 10)
std::cout << "WARNING: Ignoring TRISTATE OUTPUT statement in pin "
<< lefPin.clsPinName << ". Pin direction is replaced to " << lefPin.clsPinDirection
<< " [LEF CONTROL PARSER]\n";
numWarningsTristatePins++;
} // end if
// END WORKORUND to support tristate data pin

lefPin.clsHasPort = pin->numPorts() > 0;

if (lefPin.clsHasPort)
@@ -362,6 +373,7 @@ int lefUnits(lefrCallbackType_e c, lefiUnits* units, lefiUserData ud) {
// -----------------------------------------------------------------------------

int lefObstructionCB(lefrCallbackType_e c, lefiObstruction* obs, lefiUserData ud) {
//std::cout << "Reading lef obstacles\n";
LefDscp & dscp = getLibraryFromUserData(ud);
LefMacroDscp & lefMacro = dscp.clsLefMacroDscps.back();

@@ -382,6 +394,10 @@ int lefObstructionCB(lefrCallbackType_e c, lefiObstruction* obs, lefiUserData ud
lefObs.clsBounds.push_back(libRect);
} // end if-else
} // end for

// if (lefMacro.clsMacroName == "bufx2" || lefMacro.clsMacroName == "BUFX2") {
// std::cout << "#Obstacles" << lefMacro.clsObs.size() << "\n";
// }
return 0;
} // end method

@@ -99,7 +99,7 @@ void ISPD2018Reader::populateDesign() {
Reader::populateRsyn(lefDescriptor, defDescriptor, design);

Rsyn::Json physicalDesignConfiguration;
physicalDesignConfiguration["clsEnableMergeRectangles"] = true;
physicalDesignConfiguration["clsEnableMergeRectangles"] = false;
physicalDesignConfiguration["clsEnableNetPinBoundaries"] = true;
physicalDesignConfiguration["clsEnableRowSegments"] = true;
session.startService("rsyn.physical", physicalDesignConfiguration);
@@ -396,6 +396,25 @@ void PopulateRsyn::populateRsyn(

Rsyn::Net rsynNet = top.createNet(net.clsName);

const string use = net.clsUse;
if (use == "ANALOG") {
rsynNet.setUse(Rsyn::ANALOG);
} else if (use == "CLOCK") {
rsynNet.setUse(Rsyn::CLOCK);
} else if (use == "GROUND") {
rsynNet.setUse(Rsyn::GROUND);
} else if (use == "POWER") {
rsynNet.setUse(Rsyn::POWER);
} else if (use == "RESET") {
rsynNet.setUse(Rsyn::RESET);
} else if (use == "SCAN") {
rsynNet.setUse(Rsyn::SCAN);
} else if (use == "SIGNAL") {
rsynNet.setUse(Rsyn::SIGNAL);
} else if (use == "TIEOFF") {
rsynNet.setUse(Rsyn::TIEOFF);
} // end if

for (const DefNetConnection &connection : net.clsConnections) {

if (connection.clsComponentName == "PIN") {
Oops, something went wrong.

0 comments on commit d73ee87

Please sign in to comment.
You can’t perform that action at this time.