Added Etesian to the measurment system.

* Bug: In CRL::MeasureSet::toStringHeaders(), check and issue a warning
    if a measure label ends with a "." (dot).
* Change: In CRL::ToolEngine::getMeasure(), return the data measure
    by pointer instead of by reference (easier to manipulate afterwards).
* New: In EtesianEngine::place(), add the placement runtime (under label
    "placeT") to the measure set.
* New: In KatanaEngine::dumpMeasures(), add the Etesian runtime to the
    set of measures.
This commit is contained in:
Jean-Paul Chaput 2021-12-11 19:47:24 +01:00
parent be598c9b96
commit 2f0bf5456d
5 changed files with 53 additions and 42 deletions

View File

@ -1,7 +1,7 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2008-2018, All Rights Reserved
// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
@ -14,9 +14,7 @@
// +-----------------------------------------------------------------+
#ifndef CRL_MEASURES_PROPERTY_H
#define CRL_MEASURES_PROPERTY_H
#pragma once
#include <string>
#include <sstream>
#include <iomanip>
@ -233,6 +231,3 @@ namespace CRL {
INSPECTOR_P_SUPPORT(CRL::BaseMeasure);
INSPECTOR_P_SUPPORT(CRL::MeasuresDatas);
#endif // CRL_MEASURES_PROPERTY_H

View File

@ -1,7 +1,7 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2008-2018, All Rights Reserved
// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
@ -14,10 +14,7 @@
// +-----------------------------------------------------------------+
#ifndef CRL_TOOL_ENGINE_H
#define CRL_TOOL_ENGINE_H
#pragma once
#include <string>
#include "hurricane/Commons.h"
#include "hurricane/Timer.h"
@ -75,7 +72,7 @@ namespace CRL {
template<typename Data>
inline void addMeasure ( std::string, Data* ) const;
template<typename Data>
inline const Data& getMeasure ( std::string ) const;
inline const Data* getMeasure ( std::string ) const;
virtual std::string _getTypeName () const;
virtual std::string _getString () const;
virtual Record* _getRecord () const;
@ -127,10 +124,12 @@ namespace CRL {
{ ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data ); }
template<typename Data>
inline const Data& ToolEngine::getMeasure ( std::string name ) const
{ return ::CRL::getMeasure<Data>( getCell(), getMeasureLabel(name) )->getData( getPassNumber() ); }
inline const Data* ToolEngine::getMeasure ( std::string name ) const
{
const Measure<Data>* measure = ::CRL::getMeasure<Data>( getCell(), getMeasureLabel(name) );
if (not measure) return NULL;
return &(measure->getData( getPassNumber() ));
}
} // CRL namespace.
#endif // CRL_TOOL_ENGINE_H

View File

@ -16,6 +16,7 @@
#include <iomanip>
#include "hurricane/Error.h"
#include "hurricane/Warning.h"
#include "hurricane/DBo.h"
#include "crlcore/Measures.h"
@ -30,11 +31,13 @@ namespace CRL {
using std::string;
using std::vector;
using std::ostringstream;
using std::cout;
using std::cerr;
using std::endl;
using std::setw;
using std::right;
using Hurricane::Error;
using Hurricane::Warning;
using Hurricane::ForEachIterator;
@ -68,7 +71,16 @@ namespace CRL {
for ( size_t i=0 ; i<names.size() ; ++i ) {
const_iterator imeasure = find( names[i] );
if (imeasure == end()) continue;
if (imeasure == end()) {
string label = getString( names[i] );
label.erase( 0, label.find_last_of('.')+1 );
if (label.empty())
cerr << Warning( "MeasureSet::toStringHeaders(): Label \"%\" must not end with a dot."
, getString(names[i]).c_str()
) << endl;
out << setw(10) << right << label;
continue;
}
const BaseMeasure* measure = (*imeasure).second;
if (measure->isSimpleData()) {
@ -89,7 +101,10 @@ namespace CRL {
for ( size_t i=0 ; i<names.size() ; ++i ) {
const_iterator imeasure = find( names[i] );
if (imeasure == end()) continue;
if (imeasure == end()) {
out << setw(10) << right << 0;
continue;
}
const BaseMeasure* measure = (*imeasure).second;
if (measure->isSimpleData())

View File

@ -1442,6 +1442,7 @@ namespace Etesian {
( " - HPWL", DbU::getValueString( (DbU::Unit)coloquinte::gp::get_HPWL_wirelength(*_circuit,*_placementUB )*getSliceStep() ) ) << endl;
cmess1 << ::Dots::asString
( " - RMST", DbU::getValueString( (DbU::Unit)coloquinte::gp::get_RSMT_wirelength(*_circuit,*_placementUB )*getSliceStep() ) ) << endl;
addMeasure<double>( "placeT", getTimer().getCombTime() );
UpdateSession::open();
for ( Net* net : getCell()->getNets() ) {

View File

@ -768,29 +768,30 @@ namespace Katana {
void KatanaEngine::dumpMeasures ( ostream& out ) const
{
vector<Name> measuresLabels;
measuresLabels.push_back( getMeasureLabel("Gates" ) );
measuresLabels.push_back( getMeasureLabel("GCells" ) );
//measuresLabels.push_back( getMeasureLabel("knikT" ) );
//measuresLabels.push_back( getMeasureLabel("knikS" ) );
//measuresLabels.push_back( getMeasureLabel("GWL(l)" ) );
measuresLabels.push_back( getMeasureLabel("Area(l2)") );
measuresLabels.push_back( getMeasureLabel("Sat." ) );
measuresLabels.push_back( getMeasureLabel("loadT" ) );
measuresLabels.push_back( getMeasureLabel("loadS" ) );
measuresLabels.push_back( getMeasureLabel("H-ovE" ) );
measuresLabels.push_back( getMeasureLabel("V-ovE" ) );
measuresLabels.push_back( getMeasureLabel("Globals" ) );
measuresLabels.push_back( getMeasureLabel("Edges" ) );
measuresLabels.push_back( getMeasureLabel("assignT" ) );
measuresLabels.push_back( getMeasureLabel("algoT" ) );
measuresLabels.push_back( getMeasureLabel("algoS" ) );
measuresLabels.push_back( getMeasureLabel("finT" ) );
measuresLabels.push_back( getMeasureLabel("Segs" ) );
measuresLabels.push_back( getMeasureLabel("DWL" ) );
measuresLabels.push_back( getMeasureLabel("fWL" ) );
measuresLabels.push_back( getMeasureLabel("WLER(%)" ) );
measuresLabels.push_back( getMeasureLabel("Events" ) );
measuresLabels.push_back( getMeasureLabel("UEvents" ) );
measuresLabels.push_back( getMeasureLabel("Gates" ) );
measuresLabels.push_back( getMeasureLabel("GCells" ) );
//measuresLabels.push_back( getMeasureLabel("knikT" ) );
//measuresLabels.push_back( getMeasureLabel("knikS" ) );
//measuresLabels.push_back( getMeasureLabel("GWL" ) );
measuresLabels.push_back( "Etesian::EtesianEngine.placeT" );
measuresLabels.push_back( getMeasureLabel("Area" ) );
measuresLabels.push_back( getMeasureLabel("Sat" ) );
measuresLabels.push_back( getMeasureLabel("loadT" ) );
measuresLabels.push_back( getMeasureLabel("loadS" ) );
measuresLabels.push_back( getMeasureLabel("H-ovE" ) );
measuresLabels.push_back( getMeasureLabel("V-ovE" ) );
measuresLabels.push_back( getMeasureLabel("Globals") );
measuresLabels.push_back( getMeasureLabel("Edges" ) );
measuresLabels.push_back( getMeasureLabel("assignT") );
measuresLabels.push_back( getMeasureLabel("algoT" ) );
measuresLabels.push_back( getMeasureLabel("algoS" ) );
measuresLabels.push_back( getMeasureLabel("finT" ) );
measuresLabels.push_back( getMeasureLabel("Segs" ) );
measuresLabels.push_back( getMeasureLabel("DWL" ) );
measuresLabels.push_back( getMeasureLabel("fWL" ) );
measuresLabels.push_back( getMeasureLabel("WLER(%)") );
measuresLabels.push_back( getMeasureLabel("Events" ) );
measuresLabels.push_back( getMeasureLabel("UEvents") );
const MeasuresSet* measures = Measures::get( getCell() );