Skip to content
Permalink
Browse files

Merge remote branch 'github/dev'

* github/dev: (25 commits)
  Place port: removing prints and comments
  Bug fix in snapping of placePort function
  Bug fixes in infra, model and core
  Sync with private repository
  Bug fix in selection of obstacles
  Fix bug in DEF generation.
  Solve guideId problem
  Refactor GuideGraph
  Write DEF "VIAS" section
  Bug fix
  Tweaks for binary submission
  Bug fixes
  Adding 'Use' attribute for nets
  Register service viaOptData
  Bug fix on WriteDEFFile command
  Implemented first guide preprocessing
  Fix visualization issues
  Workaround for TRISTATE pins
  Enables PDN in Rsyn
  Added CPLEX to the project and ILP solver for MWIS
  ...
  • Loading branch information...
eder-matheus committed Apr 13, 2019
2 parents 6665086 + d73ee87 commit e567468656c287b052ed0519c56ca3618f6f1cb0
Showing with 4,285 additions and 394 deletions.
  1. +3 −3 rsyn/src/rsyn/core/RsynTypes.h
  2. +2 −2 rsyn/src/rsyn/core/dscp/LibraryCell.h
  3. +1 −0 rsyn/src/rsyn/core/obj/data/Design.h
  4. +1 −1 rsyn/src/rsyn/core/obj/data/LibraryPin.h
  5. +6 −2 rsyn/src/rsyn/core/obj/data/Net.h
  6. +2 −0 rsyn/src/rsyn/core/obj/decl/Design.h
  7. +6 −2 rsyn/src/rsyn/core/obj/decl/Instance.h
  8. +1 −1 rsyn/src/rsyn/core/obj/decl/LibraryPin.h
  9. +9 −1 rsyn/src/rsyn/core/obj/decl/Net.h
  10. +1 −1 rsyn/src/rsyn/core/obj/decl/Pin.h
  11. +21 −3 rsyn/src/rsyn/core/obj/impl/Design.h
  12. +7 −7 rsyn/src/rsyn/core/obj/impl/Instance.h
  13. +1 −1 rsyn/src/rsyn/core/obj/impl/LibraryPin.h
  14. +18 −2 rsyn/src/rsyn/core/obj/impl/Net.h
  15. +1 −1 rsyn/src/rsyn/core/obj/impl/Pin.h
  16. +6 −6 rsyn/src/rsyn/io/Report.cpp
  17. +1 −1 rsyn/src/rsyn/io/legacy/Legacy.h
  18. +191 −4 rsyn/src/rsyn/io/parser/lef_def/DEFControlParser.cpp
  19. +29 −1 rsyn/src/rsyn/io/parser/lef_def/LEFControlParser.cpp
  20. +84 −0 rsyn/src/rsyn/io/reader/PopulateRsyn.cpp
  21. +275 −18 rsyn/src/rsyn/io/writer/WriterDEF.cpp
  22. +2 −0 rsyn/src/rsyn/io/writer/WriterDEF.h
  23. +29 −0 rsyn/src/rsyn/ispd18/Guide.h
  24. +2 −0 rsyn/src/rsyn/ispd18/RoutingGuide.cpp
  25. +4 −0 rsyn/src/rsyn/ispd18/RoutingGuide.h
  26. +7 −1 rsyn/src/rsyn/model/congestion/DensityGrid/DensityGrid.cpp
  27. +21 −2 rsyn/src/rsyn/model/timing/Timer.h
  28. +1 −2 rsyn/src/rsyn/phy/PhysicalRouting.cpp
  29. +25 −1 rsyn/src/rsyn/phy/obj/decl/PhysicalDesign.h
  30. +52 −14 rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp
  31. +136 −0 rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.h
  32. +2 −4 rsyn/src/rsyn/phy/util/DefDescriptors.h
  33. +8 −1 rsyn/src/rsyn/qt/graphics/view/layout/item/Cell.h
  34. +10 −1 rsyn/src/rsyn/qt/graphics/view/layout/item/Macro.cpp
  35. +8 −1 rsyn/src/rsyn/qt/graphics/view/layout/item/StandardCell.cpp
  36. +1 −1 rsyn/src/rsyn/sandbox/obj/decl/Pin.h
  37. +1 −1 rsyn/src/rsyn/sandbox/obj/impl/Pin.h
  38. +58 −0 rsyn/src/rsyn/session/Session.cpp
  39. +1 −1 rsyn/src/rsyn/session/Session.h
  40. +264 −0 x/cmake/FindCPLEX.cmake
  41. +2,960 −298 x/ide/netbeans/nbproject/configurations.xml
  42. +1 −0 x/src/x/infra/iccad15/Infrastructure.cpp
  43. +26 −9 x/src/x/main.cpp
@@ -125,10 +125,10 @@ enum TieType {
ANY_TIE_TYPE
}; // end enum

// Mateus @ 20180917: Adding PinUse
//! @brief Describes the usage of a pin
// Mateus @ 20190204: Refatoring Use
//! @brief Describes the usage of a pin or a net
//! @note Compatible with LEF/DEF standard 5.8
enum PinUse {
enum Use {
UNKNOWN_USE = -1,
SIGNAL,
POWER,
@@ -33,7 +33,7 @@ friend class Design; // TODO: destroy this friendship...

// Mateus @ 20180917: Adding PinUse
// pin name, pin direction
std::vector<std::tuple<std::string, Direction, PinUse>> pins;
std::vector<std::tuple<std::string, Direction, Use>> pins;

// from -> to
std::vector<std::tuple<std::string, std::string>> arcs;
@@ -45,7 +45,7 @@ friend class Design; // TODO: destroy this friendship...
} // end method

// Mateus @ 20180917: Adding PinUse
void addPin(const std::string &name, const Direction &direction, const PinUse& pinUse = UNKNOWN_USE) {
void addPin(const std::string &name, const Direction &direction, const Use& pinUse = UNKNOWN_USE) {
pins.push_back(std::make_tuple(name, direction, pinUse));
} // end method

@@ -24,6 +24,7 @@ struct DesignData {
List<PinData> pins;
List<ArcData> arcs;
List<NetData> nets;
List<Cell> cells;

List<LibraryCellData> libraryCells;
List<LibraryPinData> libraryPins;
@@ -21,7 +21,7 @@ struct LibraryPinData : ObjectData {
std::string name;
Direction direction;
// Mateus @ 20180917: Adding PinUse
PinUse pinUse;
Use pinUse;
int index;

LibraryPinData() :
@@ -47,12 +47,16 @@ struct NetData : ObjectData {
// Helper used for netlist traversals.
int sign;

// Mateus @ 20190204: Adding net use;
Use netUse;

NetData() :
mid(-1),
sign(-1),
driver(nullptr),
numPinsOfType({0, 0, 0, 0}),
parent(nullptr) {
numPinsOfType({0, 0, 0, 0}),
parent(nullptr),
netUse(UNKNOWN_USE) {
} // end constructor
}; // end struct

@@ -180,6 +180,8 @@ template<typename _Object, typename _ObjectExtension> friend class AttributeImpl

//! @brief Gets the current number of pins in the design.
int getNumPins() const;

Range<ReferenceListCollection<Cell>> getAllCells() const;

////////////////////////////////////////////////////////////////////////////
// Topological Ordering
@@ -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
@@ -77,7 +77,7 @@ friend class SandboxCell;

//! @Author Mateus
//! @brief Returns the usage of the pin
PinUse getUse() const;
Use getUse() const;

//! @Author Mateus
//! @brief Returns true if the pin is used for power or ground or false
@@ -99,7 +99,7 @@ friend class Arc;
//! @brief Returns an iterable collection of the pins connected to this
//! net.
Range<CollectionOfPins>
allPins() const;
allPins(bool filterPG = true) const;

//! @brief Returns an iterable collection of the pins of a given direction
//! connected to this net.
@@ -128,6 +128,14 @@ 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;

//! @Author Mateus
//! @brief Returns the usage of the net
void setUse(const Use use);
}; // end class

// =============================================================================
@@ -191,7 +191,7 @@ friend class Net;

//! @Author Mateus
//! @brief Returns the usage of the pins
PinUse getUse() const;
Use getUse() const;

//! @Author Mateus
//! @brief Returns true if the pin is used for power or ground or false
@@ -225,15 +225,15 @@ Design::createLibraryCell(const CellDescriptor &dscp, const bool ignoreDuplicate
std::map<std::string, int> mapping;

for (int i = 0; i < numPins; i++) {
const std::tuple<std::string, Direction, PinUse> &t = dscp.pins[i];
const std::tuple<std::string, Direction, Use> &t = dscp.pins[i];
mapping[std::get<0>(t)] = i;
} // end for

// Initializes library cell's pins.
lcell->pins.resize(numPins);
for (auto element : mapping) {
const int index = element.second;
const std::tuple<std::string, Direction, PinUse> &t = dscp.pins[index];
const std::tuple<std::string, Direction, Use> &t = dscp.pins[index];

LibraryPinData * lpin = &(data->libraryPins.create()->value); // TODO: awful
lpin->id = data->libraryPins.lastId();
@@ -746,6 +746,24 @@ Design::getNumInstances() const {

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

inline
Range<ReferenceListCollection<Cell>>
Design::getAllCells() const {
for (Instance inst : data->topModule.allInstances()){
if (inst.getType() != CELL)
continue;
data->cells.add(inst.asCell());
}
Range<ReferenceListCollection<Cell>> a = ReferenceListCollection<Cell>(data->cells);
for (Cell c : a){
std::cout << c.getName() << "\n";
break;
}
return ReferenceListCollection<Cell>(data->cells);
} // end method

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

inline
int
Design::getNumInstances(const InstanceType type) const {
@@ -1030,4 +1048,4 @@ Design::allLibraryCells(const bool showDeprecatedMessage) {
return ListCollection<LibraryCellData, LibraryCell>(data->libraryCells);
} // end method

} // end namespace
} // end namespace
@@ -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
@@ -112,7 +112,7 @@ LibraryPin::isBidirectional() const {
// -----------------------------------------------------------------------------

inline
PinUse
Use
LibraryPin::getUse() const {
return data->pinUse;
} // end method
@@ -181,8 +181,8 @@ Net::hasSink() const {

inline
Range<CollectionOfPins>
Net::allPins() const {
return CollectionOfPins(data->pins);
Net::allPins(bool filterPG) const {
return CollectionOfPins(data->pins, filterPG);
} // end method

// -----------------------------------------------------------------------------
@@ -272,4 +272,20 @@ NetTag::setIdeal(const bool value) {
data->ideal = value;
} // end method

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

inline
Use
Net::getUse() const {
return data->netUse;
} // end method

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

inline
void
Net::setUse(const Use use) {
data->netUse = use;
} // end method

} // end namespace
@@ -371,7 +371,7 @@ Pin::isConnectedToClockNetwork() const {
// -----------------------------------------------------------------------------

inline
PinUse
Use
Pin::getUse() const {
Rsyn::LibraryPin lpin = getLibraryPin();

@@ -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
@@ -30,7 +30,7 @@ inline Rsyn::Direction lefPinDirectionFromString(const std::string &direction) {
return Rsyn::UNKNOWN_DIRECTION;
} // end function

inline Rsyn::PinUse lefPinUseFromString(const std::string &direction) {
inline Rsyn::Use lefPinUseFromString(const std::string &direction) {
if (direction == "SIGNAL" ) return Rsyn::SIGNAL;
if (direction == "POWER" ) return Rsyn::POWER;
if (direction == "GROUND" ) return Rsyn::GROUND;
Oops, something went wrong.

0 comments on commit e567468

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