Callbacks in EtesianEngine

This commit is contained in:
Gabriel Gouvine 2023-06-06 12:13:07 +02:00
parent c178b8c720
commit 1b41976ca1
1 changed files with 11 additions and 4 deletions

View File

@ -1167,8 +1167,11 @@ namespace Etesian {
if (conf == GraphicUpdate::FinalOnly) { if (conf == GraphicUpdate::FinalOnly) {
return; return;
} }
if (step == coloquinte::PlacementStep::UpperBound && conf == GraphicUpdate::LowerBound) { if (conf == GraphicUpdate::LowerBound) {
return; if (step == coloquinte::PlacementStep::UpperBound ||
step == coloquinte::PlacementStep::Detailed) {
return;
}
} }
auto placement = _circuit->solution(); auto placement = _circuit->solution();
_updatePlacement(&placement); _updatePlacement(&placement);
@ -1177,7 +1180,9 @@ namespace Etesian {
void EtesianEngine::globalPlace ( unsigned options ) void EtesianEngine::globalPlace ( unsigned options )
{ {
_circuit->placeGlobal(getPlaceEffort()); coloquinte::ColoquinteParameters params(getPlaceEffort());
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
_circuit->placeGlobal(params, callback);
// TODO: add callback for placement update + antenna effect // TODO: add callback for placement update + antenna effect
*_placementUB = _circuit->solution(); *_placementUB = _circuit->solution();
_updatePlacement(_placementUB); _updatePlacement(_placementUB);
@ -1186,7 +1191,9 @@ namespace Etesian {
void EtesianEngine::detailedPlace ( unsigned options ) void EtesianEngine::detailedPlace ( unsigned options )
{ {
_circuit->placeDetailed(getPlaceEffort()); coloquinte::ColoquinteParameters params(getPlaceEffort());
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
_circuit->placeDetailed(params, callback);
*_placementUB = _circuit->solution(); *_placementUB = _circuit->solution();
// TODO: add callback for placement update + antenna effect // TODO: add callback for placement update + antenna effect
*_placementLB = *_placementUB; // In case we run other passes *_placementLB = *_placementUB; // In case we run other passes