coriolis/deprecated/mauka/src/FeedCells.cpp

105 lines
3.0 KiB
C++
Raw Normal View History

2010-06-26 10:08:02 -05:00
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2010-2010, All Rights Reserved
//
// ===================================================================
//
// $Id$
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S |
// | M a u k a - P l a c e r |
// | |
// | Author : Jean-Paul Chaput |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Module : "./FeedCells.cpp" |
// | *************************************************************** |
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include <sstream>
#include "hurricane/Warning.h"
#include "mauka/FeedCells.h"
#include "mauka/MaukaEngine.h"
namespace Mauka {
using std::cerr;
using std::endl;
using std::map;
using std::string;
using std::ostringstream;
using std::make_pair;
using Hurricane::Warning;
using Hurricane::DbU;
void FeedCells::addFeed ( Cell* cell )
{
Etesian integration with Chip & ClockTree plugins. * New: In Hurricane, in DebugSession, add a new method to activate the trace inconditionally with a certain level. * New: In Hurricane, in HyperNet, allow copy construction as there is no reason to disallow it and we need it now. * New: In Hurricane, in Cell::flattenNets(), add a new option to prevent the flattening of the clock net(s). For more safety perform the DeepNet creation *outside* the Collection loop. * Bug: In Hurricane, in Cell_HyperNetRootNetOccurrences, skip the DeepNets because they are the result of another flattening operation. * New: In Isobar, in PyBasicLayer, export C++ method getBlockageLayer(). * New: In Isobar, in PyRoutingGauge, export C++ method getLayerPitch(), needed by Cumulus plugins. * New: In Etesian, EtesianEngine::findYSpin() to look for the Y orientation if some cells are already placed. Typically the buffers of a clock tree. Pass the correct orienation to row_compatible_orientation(). Do not try to add feeds in the ISPD05 benchmarks. For now the benchmarks are detected through their names (unreliable). * Change: In Knik, in KnikEngine::initGlobalRouting(), allow the clock to be routed as an ordinary signal when the clock tree is not used. * New: In Kite, in BuildPowerRails, management & detection for the pre-routed clock. In KiteEngine constructor, early initialization of the blockage net to avoid later troubles in BuildPowerRails. * New: In Cumulus, in ChipPlugin, add support for Etesian plus new configuration parameter 'clockTree.placerEngine' to select between Mauka and Etesian. * New: In Cumulus, in BlockCorona, add blockages in the vertical sides in the vertical layer to prevent the router to use the vertical tracks in under the prower lines (for example, blockage in M3 with power line M5). In Cumulus, in ChipConf add attribute to access the blockage net. * New: In Cumulus, when the clock tree is disabled, do not generate the last rail around the block (the clock rail). * Bug: In Cumulus, in ChipConf use the clock pad to guess the clock signals and *not* the power pad. Add more meaningful error messages if a pad global signal is not found (implicit connexion by name). * Bug: In Cumulus, in ClockTree, compute correctly the cells Y spin, that is *from the bottom of the cell AB* (not from 'zero').
2015-02-24 06:13:17 -06:00
if (cell == NULL) return;
if (not _feedCells.size()) return;
2010-06-26 10:08:02 -05:00
DbU::Unit pitch = _mauka->getPitch();
if ( cell->getAbutmentBox().getWidth() % pitch != 0 )
cerr << Warning("FeedCells::addFeed(): &lt;%s&gt; has not a width (%s) multiple of pitch (%s)."
,getString(cell->getName()).c_str()
,DbU::getValueString(cell->getAbutmentBox().getWidth()).c_str()
,DbU::getValueString(pitch).c_str()
) << endl;
int pitchNb = (int)(cell->getAbutmentBox().getWidth() / pitch );
if ( getFeed(pitchNb) != NULL ) {
cerr << Warning("FeedCells::addFeed(): &lt;%s&gt; duplicate feed for width %d."
,getString(cell->getName()).c_str()
,pitchNb
) << endl;
return;
}
_feedCells.insert ( make_pair(pitchNb,cell) );
}
Cell* FeedCells::getBiggestFeed () const
{
if ( _feedCells.empty() ) return NULL;
return (*(--_feedCells.end())).second;
}
Cell* FeedCells::getSmallestFeed () const
{
if ( _feedCells.empty() ) return NULL;
return (*(_feedCells.begin())).second;
}
Cell* FeedCells::getFeed ( int pitches ) const
{
map<int,Cell*>::const_iterator ifeed = _feedCells.find ( pitches );
if ( ifeed == _feedCells.end() ) return NULL;
return (*ifeed).second;
}
string FeedCells::getNewFeedName () const
{
ostringstream name;
name << "feed_" << _feedCount++;
return name.str();
}
} // End of Mauka namespace.