Permalink
Browse files

Sync with private repository.

Includes fix for issue #15.
  • Loading branch information...
gaflach committed Nov 11, 2018
1 parent 4e46927 commit fc72c786d34aba906c26295f508dd4011362d494
Showing with 1,594 additions and 406 deletions.
  1. +3 −0 CMakeLists.txt
  2. +0 −37 rsyn/script/install-libs.sh
  3. +24 −9 rsyn/src/rsyn/core/RsynTypes.h
  4. +5 −3 rsyn/src/rsyn/core/dscp/LibraryCell.h
  5. +3 −0 rsyn/src/rsyn/core/obj/data/LibraryPin.h
  6. +9 −6 rsyn/src/rsyn/core/obj/decl/Design.h
  7. +2 −2 rsyn/src/rsyn/core/obj/decl/Instance.h
  8. +9 −0 rsyn/src/rsyn/core/obj/decl/LibraryPin.h
  9. +8 −0 rsyn/src/rsyn/core/obj/decl/Pin.h
  10. +4 −2 rsyn/src/rsyn/core/obj/impl/Design.h
  11. +4 −4 rsyn/src/rsyn/core/obj/impl/Instance.h
  12. +16 −0 rsyn/src/rsyn/core/obj/impl/LibraryPin.h
  13. +28 −0 rsyn/src/rsyn/core/obj/impl/Pin.h
  14. +14 −1 rsyn/src/rsyn/io/legacy/Legacy.h
  15. +177 −169 rsyn/src/rsyn/io/parser/lef_def/DEFControlParser.cpp
  16. +31 −6 rsyn/src/rsyn/io/parser/lef_def/LEFControlParser.cpp
  17. +2 −1 rsyn/src/rsyn/io/reader/PopulateRsyn.cpp
  18. +3 −0 rsyn/src/rsyn/io/{ → writer}/Writer.cpp
  19. +2 −1 rsyn/src/rsyn/io/{ → writer}/Writer.h
  20. +629 −0 rsyn/src/rsyn/io/writer/WriterDEF.cpp
  21. +406 −0 rsyn/src/rsyn/io/writer/WriterDEF.h
  22. +1 −0 rsyn/src/rsyn/phy/obj/data/PhysicalLibraryCellData.h
  23. +1 −2 rsyn/src/rsyn/phy/obj/data/PhysicalRowData.h
  24. +1 −0 rsyn/src/rsyn/phy/obj/data/PhysicalSiteData.h
  25. +3 −0 rsyn/src/rsyn/phy/obj/decl/PhysicalDesign.h
  26. +4 −0 rsyn/src/rsyn/phy/obj/decl/PhysicalLibraryCell.h
  27. +2 −0 rsyn/src/rsyn/phy/obj/decl/PhysicalSite.h
  28. +16 −1 rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp
  29. +6 −0 rsyn/src/rsyn/phy/obj/impl/PhysicalLibraryCell.h
  30. +1 −1 rsyn/src/rsyn/phy/obj/impl/PhysicalRow.h
  31. +6 −0 rsyn/src/rsyn/phy/obj/impl/PhysicalSite.h
  32. +1 −1 rsyn/src/rsyn/phy/util/BookshelfMapper.cpp
  33. +12 −1 rsyn/src/rsyn/phy/util/DefDescriptors.h
  34. +2 −1 rsyn/src/rsyn/phy/util/LefDescriptors.h
  35. +48 −3 rsyn/src/rsyn/phy/util/PhysicalLayerUtil.cpp
  36. +11 −1 rsyn/src/rsyn/phy/util/PhysicalTypes.h
  37. +10 −1 rsyn/src/rsyn/phy/util/PhysicalUtil.h
  38. +4 −1 rsyn/src/rsyn/qt/graphics/view/layout/LayoutGraphicsScene.cpp
  39. +3 −0 rsyn/src/rsyn/qt/graphics/view/layout/item/Cell.cpp
  40. +31 −0 rsyn/src/rsyn/qt/graphics/view/layout/layer/Floorplan.cpp
  41. +1 −0 rsyn/src/rsyn/qt/graphics/view/layout/layer/Floorplan.h
  42. +1 −1 rsyn/src/rsyn/qt/graphics/view/layout/layer/Routing.cpp
  43. +1 −0 rsyn/src/rsyn/qt/window/MainWindow.cpp
  44. +9 −1 rsyn/src/rsyn/sandbox/obj/decl/Pin.h
  45. +28 −0 rsyn/src/rsyn/sandbox/obj/impl/Pin.h
  46. +1 −0 rsyn/src/rsyn/setup/reader.cpp
  47. +2 −1 rsyn/src/rsyn/setup/service.cpp
  48. +7 −0 rsyn/src/rsyn/util/Bounds.h
  49. +0 −147 rsyn/src/rsyn/util/Matrix.h
  50. +1 −1 x/src/x/opto/ext/FastPlace.cpp
  51. +1 −1 x/src/x/opto/ufrgs/ispd16/ISPD16Flow.cpp
@@ -55,6 +55,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type")
# Check Dependencies #
######################
find_package(Boost COMPONENTS system filesystem program_options REQUIRED)
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(PNG REQUIRED)
find_package(COIN)
find_package(GLPK)

This file was deleted.

Oops, something went wrong.
@@ -93,24 +93,24 @@ enum PhysicalOrientation : std::int8_t {
ORIENTATION_INVALID = -1,

//! @brief North Orientation (R0)
ORIENTATION_N,
ORIENTATION_N = 0,
//! @brief South orientation (R180)
ORIENTATION_S,
ORIENTATION_S = 1,
//! @brief West orientation (R90)
ORIENTATION_W,
ORIENTATION_W = 2,
//! @brief East orientation (R270)
ORIENTATION_E,
ORIENTATION_E = 3,
//! @brief Flipped-North orientation (MY)
ORIENTATION_FN,
ORIENTATION_FN = 4,
//! @brief Flipped-South orientation (MX)
ORIENTATION_FS,
ORIENTATION_FS = 5,
//! @brief Flipped-West orientation (MX90)
ORIENTATION_FW,
ORIENTATION_FW = 6,
//! @brief Flipped-East orientation (MY90)
ORIENTATION_FE,
ORIENTATION_FE = 7,

//! @brief Number of orientations
NUM_PHY_ORIENTATION
NUM_PHY_ORIENTATION = 8
}; // end enum

enum BufferType {
@@ -125,6 +125,21 @@ enum TieType {
ANY_TIE_TYPE
}; // end enum

// Mateus @ 20180917: Adding PinUse
//! @brief Describes the usage of a pin
//! @note Compatible with LEF/DEF standard 5.8
enum PinUse {
UNKNOWN_USE = -1,
SIGNAL,
POWER,
GROUND,
CLOCK,
TIEOFF,
ANALOG,
SCAN,
RESET
};

} // end namespace

#endif
@@ -31,8 +31,9 @@ friend class Design; // TODO: destroy this friendship...
// name
std::string name;

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

// from -> to
std::vector<std::tuple<std::string, std::string>> arcs;
@@ -43,8 +44,9 @@ friend class Design; // TODO: destroy this friendship...
this->name = name; // TODO: ugly
} // end method

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

void addArc(const std::string &from, const std::string &to) {
@@ -20,12 +20,15 @@ struct LibraryPinData : ObjectData {
LibraryCell lcell;
std::string name;
Direction direction;
// Mateus @ 20180917: Adding PinUse
PinUse pinUse;
int index;

LibraryPinData() :
design(nullptr),
lcell(nullptr),
direction(UNKNOWN_DIRECTION),
pinUse(UNKNOWN_USE),
index(-1) {
} // end constructor
}; // end struct
@@ -334,12 +334,14 @@ class CollectionOfGenericPinsFilteredByDirection {
std::vector<PinType> &pins;
Direction direction;
int index;
bool filterPG;
public:
CollectionOfGenericPinsFilteredByDirection(std::vector<PinType> &pins,
Direction direction)
: pins(pins), direction(direction), index(0) {}
Direction direction, bool filterPG = true)
: pins(pins), direction(direction), index(0), filterPG(filterPG) {}

bool filter() { return current().getDirection() != direction; }
bool filter() { return current().getDirection() != direction ||
(filterPG && current().isPowerOrGround()); }
bool stop() { return index >= pins.size(); }
void next() { ++index; }
PinType current() { return pins[index]; }
@@ -353,11 +355,12 @@ class CollectionOfGenericPins {
protected:
std::vector<PinType> &pins;
int index;
bool filterPG;
public:
CollectionOfGenericPins(std::vector<PinType> &pins)
: pins(pins), index(0) {}
CollectionOfGenericPins(std::vector<PinType> &pins, bool filterPG = true)
: pins(pins), index(0), filterPG(filterPG) {}

bool filter() { return false; }
bool filter() { return filterPG && current().isPowerOrGround(); }
bool stop() { return index >= pins.size(); }
void next() { ++index; }
PinType current() { return pins[index]; }
@@ -151,12 +151,12 @@ friend class PhysicalService;
//! to be consistent, only the interface pins are returned that is
//! the outer pins of the module's ports.
Range<CollectionOfPinsFilteredByDirection>
allPins(const Direction direction) const;
allPins(const Direction direction, bool filterPG = true) const;

//! @brief Returns an iterable collection of all interface pins.
//! @see allPins(const Direction direction)
Range<CollectionOfPins>
allPins() const;
allPins(bool filterPG = true) const;

//! @brief Returns an iterable collection of all arcs.
Range<CollectionOfArcs>
@@ -74,6 +74,15 @@ friend class SandboxCell;
//! @brief Returns true if this library pin is a bidirectional and false
//! otherwise.
bool isBidirectional() const;

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

//! @Author Mateus
//! @brief Returns true if the pin is used for power or ground or false
//! otherwise.
bool isPowerOrGround() const;
}; // end class

} // end namespace
@@ -189,6 +189,14 @@ friend class Net;
//! is raised.
bool isConnectedToClockNetwork() const;

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

//! @Author Mateus
//! @brief Returns true if the pin is used for power or ground or false
//! otherwise.
bool isPowerOrGround() const;
}; // end class

} // end namespace
@@ -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> &t = dscp.pins[i];
const std::tuple<std::string, Direction, PinUse> &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> &t = dscp.pins[index];
const std::tuple<std::string, Direction, PinUse> &t = dscp.pins[index];

LibraryPinData * lpin = &(data->libraryPins.create()->value); // TODO: awful
lpin->id = data->libraryPins.lastId();
@@ -242,6 +242,8 @@ Design::createLibraryCell(const CellDescriptor &dscp, const bool ignoreDuplicate
lpin->lcell = libraryCell;
lpin->name = std::get<0>(t);
lpin->direction = std::get<1>(t);
// Mateus @ 20180917: Adding PinUse
lpin->pinUse = std::get<2>(t);

lcell->pins[index] = LibraryPin(lpin);
switch (std::get<1>(t)){
@@ -337,16 +337,16 @@ Instance::getAnyArc() {

inline
Range<CollectionOfPinsFilteredByDirection>
Instance::allPins(const Direction direction) const {
return CollectionOfPinsFilteredByDirection(data->pins, direction);
Instance::allPins(const Direction direction, bool filterPG) const {
return CollectionOfPinsFilteredByDirection(data->pins, direction, filterPG);
} // end method

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

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

// -----------------------------------------------------------------------------
@@ -109,4 +109,20 @@ LibraryPin::isBidirectional() const {
return getDirection() == Rsyn::BIDIRECTIONAL;
} // end method

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

inline
PinUse
LibraryPin::getUse() const {
return data->pinUse;
} // end method

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

inline
bool
LibraryPin::isPowerOrGround() const {
return (getUse() == POWER || getUse() == GROUND);
} // end method

} // end namespace
@@ -368,4 +368,32 @@ Pin::isConnectedToClockNetwork() const {
return data->net? data->net.isClockNetwork() : false;
} // end method

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

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

if (!lpin) {
return Rsyn::UNKNOWN_USE;
} // end if

return lpin.getUse();
} // end method

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

inline
bool
Pin::isPowerOrGround() const {
Rsyn::LibraryPin lpin = getLibraryPin();

if (!lpin) {
return false;
} // end if

return (lpin.getUse() == POWER || lpin.getUse() == GROUND);
} // end method

} // end namespace
@@ -1,4 +1,4 @@
/* Copyright 2014-2018 Rsyn
/* Copyright 2014-2018 Rsyn
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,19 @@ inline Rsyn::Direction lefPinDirectionFromString(const std::string &direction) {
return Rsyn::UNKNOWN_DIRECTION;
} // end function

inline Rsyn::PinUse lefPinUseFromString(const std::string &direction) {
if (direction == "SIGNAL" ) return Rsyn::SIGNAL;
if (direction == "POWER" ) return Rsyn::POWER;
if (direction == "GROUND" ) return Rsyn::GROUND;
if (direction == "CLOCK") return Rsyn::CLOCK;
if (direction == "TIEOFF") return Rsyn::TIEOFF;
if (direction == "ANALOG") return Rsyn::ANALOG;
if (direction == "SCAN") return Rsyn::SCAN;
if (direction == "RESET") return Rsyn::RESET;
return Rsyn::UNKNOWN_USE;
} // end function


inline Rsyn::Direction bookshelfPinDirectionFromString(const std::string &direction) {
if (direction == "I") return Rsyn::IN;
if (direction == "O") return Rsyn::OUT;
Oops, something went wrong.

0 comments on commit fc72c78

Please sign in to comment.