Setup Coloquinte callbacks + start rewriting antenna code

This commit is contained in:
Gabriel Gouvine 2023-06-03 12:00:33 +02:00
parent 4f1ce6cfcb
commit 585489860e
2 changed files with 20 additions and 8 deletions

View File

@ -1158,6 +1158,18 @@ namespace Etesian {
}
}
void EtesianEngine::_coloquinteCallback(coloquinte::PlacementStep step) {
GraphicUpdate conf = getUpdateConf();
if (conf == GraphicUpdate::FinalOnly) {
return;
}
if (step == coloquinte::PlacementStep::UpperBound && conf == GraphicUpdate::LowerBound) {
return;
}
auto placement = _circuit->solution();
_updatePlacement(&placement);
}
void EtesianEngine::globalPlace ( unsigned options )
{
@ -1180,8 +1192,6 @@ namespace Etesian {
void EtesianEngine::antennaProtect ()
{
// TODO
/*
DbU::Unit maxWL = getAntennaGateMaxWL();
if (not maxWL) return;
@ -1190,8 +1200,11 @@ namespace Etesian {
int diodeWidth = _diodeCell->getAbutmentBox().getWidth() / getSliceStep();
cdebug_log(122,0) << "diodeWidth=" << diodeWidth << "p" << endl;
for ( coloquinte::int inet=0 ; inet < _circuit->nbNets() ; ++inet ) {
DbU::Unit rsmt = toDbU( coloquinte::get_RSMT_length( *_circuit, *_placementUB, inet ) );
vector<int> cellWidth = _circuit->cellWidth();
for (int inet=0 ; inet < _circuit->nbNets() ; ++inet ) {
// TODO: compute net size based on the current placement
// TODO: net ids do not match coloquinte net orders when some nets are empty
DbU::Unit rsmt = std::numeric_limits<DbU::Unit>::max();
Net* net = std::get<0>( _idsToNets[inet] );
if ((rsmt > maxWL) or net->isExternal()) {
@ -1213,15 +1226,13 @@ namespace Etesian {
if (iinst == _instsToIds.end()) continue;
std::get<1>( _idsToInsts[ (*iinst).second ] ).push_back( rp );
coloquinte::point<int> cell_size = _circuit->get_cell_size( (*iinst).second );
cell_size.x += 2*diodeWidth;
_circuit->set_cell_size( (*iinst).second, cell_size );
cellWidth[(*iinst).second] += 2*diodeWidth;
++count;
}
}
}
_circuit->setCellWidth(cellWidth);
cmess1 << ::Dots::asInt( " - Inserted diodes", count ) << endl;
*/
}

View File

@ -195,6 +195,7 @@ namespace Etesian {
inline uint32_t _getNewDiodeId ();
Instance* _createDiode ( Cell* );
void _updatePlacement ( const coloquinte::PlacementSolution*, uint32_t flags=0 );
void _coloquinteCallback(coloquinte::PlacementStep step);
void _progressReport1 ( string label ) const;
void _progressReport2 ( string label ) const;
};