Split callback in Etesian to allow for derived placer classes
This commit is contained in:
parent
44ce8dd162
commit
d27cc8b956
|
@ -1080,6 +1080,18 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EtesianEngine::_coloquinteCallback(coloquinte::PlacementStep step) {
|
void EtesianEngine::_coloquinteCallback(coloquinte::PlacementStep step) {
|
||||||
|
|
||||||
|
// Graphical update
|
||||||
|
GraphicUpdate conf = getUpdateConf();
|
||||||
|
bool updatePlacement = conf == GraphicUpdate::UpdateAll;
|
||||||
|
if (conf == GraphicUpdate::LowerBound &&
|
||||||
|
step == coloquinte::PlacementStep::LowerBound) {
|
||||||
|
updatePlacement = true;
|
||||||
|
}
|
||||||
|
_coloquinteCallbackCore(step, updatePlacement);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EtesianEngine::_coloquinteCallbackCore(coloquinte::PlacementStep step, bool updatePlacement) {
|
||||||
auto placement = _circuit->solution();
|
auto placement = _circuit->solution();
|
||||||
if (step == coloquinte::PlacementStep::LowerBound) {
|
if (step == coloquinte::PlacementStep::LowerBound) {
|
||||||
*_placementLB = placement;
|
*_placementLB = placement;
|
||||||
|
@ -1088,13 +1100,7 @@ namespace Etesian {
|
||||||
*_placementUB = placement;
|
*_placementUB = placement;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Graphical update
|
if (updatePlacement) {
|
||||||
GraphicUpdate conf = getUpdateConf();
|
|
||||||
if (conf == GraphicUpdate::UpdateAll) {
|
|
||||||
_updatePlacement(&placement);
|
|
||||||
}
|
|
||||||
else if (conf == GraphicUpdate::LowerBound &&
|
|
||||||
step == coloquinte::PlacementStep::LowerBound) {
|
|
||||||
_updatePlacement(&placement);
|
_updatePlacement(&placement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ extern "C" {
|
||||||
static PyModuleDef PyEtesian_ModuleDef =
|
static PyModuleDef PyEtesian_ModuleDef =
|
||||||
{ PyModuleDef_HEAD_INIT
|
{ PyModuleDef_HEAD_INIT
|
||||||
, "Etesian" /* m_name */
|
, "Etesian" /* m_name */
|
||||||
, "Standard cell analytical placer (based on SimPL)."
|
, "Standard cell analytical placer."
|
||||||
/* m_doc */
|
/* m_doc */
|
||||||
, -1 /* m_size */
|
, -1 /* m_size */
|
||||||
, PyEtesian_Methods /* m_methods */
|
, PyEtesian_Methods /* m_methods */
|
||||||
|
|
|
@ -185,11 +185,15 @@ namespace Etesian {
|
||||||
private:
|
private:
|
||||||
EtesianEngine ( const EtesianEngine& );
|
EtesianEngine ( const EtesianEngine& );
|
||||||
EtesianEngine& operator= ( const EtesianEngine& );
|
EtesianEngine& operator= ( const EtesianEngine& );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void _coloquinteCallback(coloquinte::PlacementStep step);
|
||||||
|
void _coloquinteCallbackCore(coloquinte::PlacementStep step, bool updatePlacement);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline uint32_t _getNewDiodeId ();
|
inline uint32_t _getNewDiodeId ();
|
||||||
Instance* _createDiode ( Cell* );
|
Instance* _createDiode ( Cell* );
|
||||||
void _updatePlacement ( const coloquinte::PlacementSolution* );
|
void _updatePlacement ( const coloquinte::PlacementSolution* );
|
||||||
void _coloquinteCallback(coloquinte::PlacementStep step);
|
|
||||||
void _checkNotAFeed ( Occurrence occurrence ) const;
|
void _checkNotAFeed ( Occurrence occurrence ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue