Complete fonctions of class Delay
This commit is contained in:
parent
bf181787cb
commit
dedad34585
|
@ -21,6 +21,7 @@
|
|||
Tree.cpp
|
||||
Elmore.cpp
|
||||
SeabreezeEngine.cpp
|
||||
Delay.cpp
|
||||
#GraphicSeabreezeEngine.cpp
|
||||
)
|
||||
set( pyCpps PySeabreeze.cpp
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include "hurricane/RoutingPad.h"
|
||||
|
@ -39,13 +38,34 @@ namespace Seabreeze {
|
|||
void Delay::addPair ( RoutingPad* driver, RoutingPad* sink, double delay)
|
||||
{
|
||||
if ( _values.count(driver) > 0 ) {
|
||||
cerr << "Driver already exist." << endl
|
||||
cerr << "Driver " << driver << " already exists." << endl
|
||||
<< "If you want to add value, please use the function addValue( RoutingPad*, RoutingPad*, double)" << endl
|
||||
<< "Example : addValue(driver, sink, delay)" << endl;
|
||||
}
|
||||
else {
|
||||
map<RoutingPad*, double> val { {sink, delay}, };
|
||||
_values.insert(driver, val);
|
||||
_values.insert({driver, val});
|
||||
}
|
||||
}
|
||||
|
||||
void Delay::addValue ( RoutingPad* driver, RoutingPad* sink, double delay )
|
||||
{
|
||||
if ( _values[driver].count(sink) > 0 ) {
|
||||
cerr << "Delay from " << driver << " to " << sink << " is already computed" << endl;
|
||||
}
|
||||
else {
|
||||
_values[driver].insert({sink, delay});
|
||||
}
|
||||
}
|
||||
|
||||
void Delay::printDelays ()
|
||||
{
|
||||
for ( auto dmap : _values ) {
|
||||
cerr << "Delay from : " << dmap.first << " to :" << endl;
|
||||
map<RoutingPad*, double>& val = dmap.second;
|
||||
for ( auto smap : val ) {
|
||||
cerr << smap.first << " : " << smap.second << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue