Improve callbacks
This commit is contained in:
parent
fb694e1c3d
commit
1beaaf93e4
|
@ -476,6 +476,7 @@ namespace Etesian {
|
||||||
_placementUB = NULL;
|
_placementUB = NULL;
|
||||||
//_densityLimits = NULL;
|
//_densityLimits = NULL;
|
||||||
_diodeCount = 0;
|
_diodeCount = 0;
|
||||||
|
_antennaDone = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1163,19 +1164,27 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EtesianEngine::_coloquinteCallback(coloquinte::PlacementStep step) {
|
void EtesianEngine::_coloquinteCallback(coloquinte::PlacementStep step) {
|
||||||
GraphicUpdate conf = getUpdateConf();
|
|
||||||
if (conf == GraphicUpdate::FinalOnly) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (conf == GraphicUpdate::LowerBound) {
|
|
||||||
if (step == coloquinte::PlacementStep::UpperBound ||
|
|
||||||
step == coloquinte::PlacementStep::Detailed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto placement = _circuit->solution();
|
auto placement = _circuit->solution();
|
||||||
|
if (step == coloquinte::PlacementStep::LowerBound) {
|
||||||
|
*_placementLB = placement;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
*_placementUB = placement;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Graphical update
|
||||||
|
GraphicUpdate conf = getUpdateConf();
|
||||||
|
if (conf == GraphicUpdate::UpdateAll) {
|
||||||
_updatePlacement(&placement);
|
_updatePlacement(&placement);
|
||||||
}
|
}
|
||||||
|
else if (conf == GraphicUpdate::LowerBound &&
|
||||||
|
step == coloquinte::PlacementStep::LowerBound) {
|
||||||
|
_updatePlacement(&placement);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Antenna update
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void EtesianEngine::globalPlace ( unsigned options )
|
void EtesianEngine::globalPlace ( unsigned options )
|
||||||
|
@ -1183,7 +1192,6 @@ namespace Etesian {
|
||||||
coloquinte::ColoquinteParameters params(getPlaceEffort());
|
coloquinte::ColoquinteParameters params(getPlaceEffort());
|
||||||
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
||||||
_circuit->placeGlobal(params, callback);
|
_circuit->placeGlobal(params, callback);
|
||||||
// TODO: add callback for placement update + antenna effect
|
|
||||||
*_placementUB = _circuit->solution();
|
*_placementUB = _circuit->solution();
|
||||||
_updatePlacement(_placementUB);
|
_updatePlacement(_placementUB);
|
||||||
}
|
}
|
||||||
|
@ -1195,7 +1203,6 @@ namespace Etesian {
|
||||||
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
||||||
_circuit->placeDetailed(params, callback);
|
_circuit->placeDetailed(params, callback);
|
||||||
*_placementUB = _circuit->solution();
|
*_placementUB = _circuit->solution();
|
||||||
// TODO: add callback for placement update + antenna effect
|
|
||||||
*_placementLB = *_placementUB; // In case we run other passes
|
*_placementLB = *_placementUB; // In case we run other passes
|
||||||
_updatePlacement(_placementUB);
|
_updatePlacement(_placementUB);
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,7 @@ namespace Etesian {
|
||||||
uint32_t _diodeCount;
|
uint32_t _diodeCount;
|
||||||
uint32_t _bufferCount;
|
uint32_t _bufferCount;
|
||||||
NetNameSet _excludedNets;
|
NetNameSet _excludedNets;
|
||||||
|
bool _antennaDone;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Constructors & Destructors.
|
// Constructors & Destructors.
|
||||||
|
|
Loading…
Reference in New Issue