Merge remote-tracking branch 'upstream/master' into sta_update_upstream_lvf_stuff
This commit is contained in:
commit
b58fb44657
|
|
@ -223,6 +223,14 @@ delayAsString(const Delay &delay,
|
||||||
sta->units()->timeUnit()->digits(), sta);
|
sta->units()->timeUnit()->digits(), sta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
delayAsString(const Delay &delay,
|
||||||
|
int digits,
|
||||||
|
const StaState *sta)
|
||||||
|
{
|
||||||
|
return delayAsString(delay, EarlyLate::late(), digits, sta);
|
||||||
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
delayAsString(const Delay &delay,
|
delayAsString(const Delay &delay,
|
||||||
const EarlyLate *early_late,
|
const EarlyLate *early_late,
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,10 @@ public:
|
||||||
void setSkewness(float skewness);
|
void setSkewness(float skewness);
|
||||||
|
|
||||||
void operator=(float delay);
|
void operator=(float delay);
|
||||||
|
// This allows applications that do not support statistical timing
|
||||||
|
// to treat Delays as floats without explicitly converting with
|
||||||
|
// delayAsFloat.
|
||||||
|
operator float() const { return mean(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<float, 4> values_;
|
std::array<float, 4> values_;
|
||||||
|
|
@ -203,9 +207,15 @@ void
|
||||||
delaySetMean(Delay &delay,
|
delaySetMean(Delay &delay,
|
||||||
float mean);
|
float mean);
|
||||||
|
|
||||||
|
// early_late == late
|
||||||
std::string
|
std::string
|
||||||
delayAsString(const Delay &delay,
|
delayAsString(const Delay &delay,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
|
// early_late == late
|
||||||
|
std::string
|
||||||
|
delayAsString(const Delay &delay,
|
||||||
|
int digits,
|
||||||
|
const StaState *sta);
|
||||||
std::string
|
std::string
|
||||||
delayAsString(const Delay &delay,
|
delayAsString(const Delay &delay,
|
||||||
const EarlyLate *early_late,
|
const EarlyLate *early_late,
|
||||||
|
|
|
||||||
|
|
@ -138,13 +138,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log output to filename until logEnd is called.
|
// Log output to filename until logEnd is called.
|
||||||
virtual void logBegin(std::string_view filename);
|
virtual void logBegin(std::string filename);
|
||||||
virtual void logEnd();
|
virtual void logEnd();
|
||||||
|
|
||||||
// Redirect output to filename until redirectFileEnd is called.
|
// Redirect output to filename until redirectFileEnd is called.
|
||||||
virtual void redirectFileBegin(std::string_view filename);
|
virtual void redirectFileBegin(std::string filename);
|
||||||
// Redirect append output to filename until redirectFileEnd is called.
|
// Redirect append output to filename until redirectFileEnd is called.
|
||||||
virtual void redirectFileAppendBegin(std::string_view filename);
|
virtual void redirectFileAppendBegin(std::string filename);
|
||||||
virtual void redirectFileEnd();
|
virtual void redirectFileEnd();
|
||||||
// Redirect output to a string until redirectStringEnd is called.
|
// Redirect output to a string until redirectStringEnd is called.
|
||||||
virtual void redirectStringBegin();
|
virtual void redirectStringBegin();
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,10 @@ class ReportTcl : public Report
|
||||||
public:
|
public:
|
||||||
ReportTcl();
|
ReportTcl();
|
||||||
virtual ~ReportTcl();
|
virtual ~ReportTcl();
|
||||||
void logBegin(std::string_view filename) override;
|
void logBegin(std::string filename) override;
|
||||||
void logEnd() override;
|
void logEnd() override;
|
||||||
void redirectFileBegin(std::string_view filename) override;
|
void redirectFileBegin(std::string filename) override;
|
||||||
void redirectFileAppendBegin(std::string_view filename) override;
|
void redirectFileAppendBegin(std::string filename) override;
|
||||||
void redirectFileEnd() override;
|
void redirectFileEnd() override;
|
||||||
void redirectStringBegin() override;
|
void redirectStringBegin() override;
|
||||||
const char *redirectStringEnd() override;
|
const char *redirectStringEnd() override;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "LibertyLocation.hh"
|
#include <string>
|
||||||
|
#include <istream>
|
||||||
|
|
||||||
#include "LibertyParse.hh"
|
#include "LibertyParse.hh"
|
||||||
|
|
||||||
#ifndef __FLEX_LEXER_H
|
#ifndef __FLEX_LEXER_H
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ Path::Path() :
|
||||||
|
|
||||||
Path::Path(const Path *path) :
|
Path::Path(const Path *path) :
|
||||||
prev_path_(path ? path->prev_path_ : nullptr),
|
prev_path_(path ? path->prev_path_ : nullptr),
|
||||||
arrival_(path ? path->arrival_ : 0.0),
|
arrival_(path ? path->arrival_ : delay_zero),
|
||||||
required_(path ? path->required_ : 0.0),
|
required_(path ? path->required_ : delay_zero),
|
||||||
vertex_id_(path ? path->vertex_id_ : vertex_id_null),
|
vertex_id_(path ? path->vertex_id_ : vertex_id_null),
|
||||||
tag_index_(path ? path->tag_index_ : tag_index_null),
|
tag_index_(path ? path->tag_index_ : tag_index_null),
|
||||||
is_enum_(path ? path->is_enum_ : false),
|
is_enum_(path ? path->is_enum_ : false),
|
||||||
|
|
|
||||||
|
|
@ -185,12 +185,11 @@ Report::isSuppressed(int id)
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void
|
void
|
||||||
Report::logBegin(std::string_view filename)
|
Report::logBegin(std::string filename)
|
||||||
{
|
{
|
||||||
std::string filename_str(filename);
|
log_stream_ = fopen(filename.c_str(), "w");
|
||||||
log_stream_ = fopen(filename_str.c_str(), "w");
|
|
||||||
if (log_stream_ == nullptr)
|
if (log_stream_ == nullptr)
|
||||||
throw FileNotWritable(std::move(filename_str));
|
throw FileNotWritable(std::move(filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -202,21 +201,19 @@ Report::logEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Report::redirectFileBegin(std::string_view filename)
|
Report::redirectFileBegin(std::string filename)
|
||||||
{
|
{
|
||||||
std::string filename_str(filename);
|
redirect_stream_ = fopen(filename.c_str(), "w");
|
||||||
redirect_stream_ = fopen(filename_str.c_str(), "w");
|
|
||||||
if (redirect_stream_ == nullptr)
|
if (redirect_stream_ == nullptr)
|
||||||
throw FileNotWritable(std::move(filename_str));
|
throw FileNotWritable(std::move(filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Report::redirectFileAppendBegin(std::string_view filename)
|
Report::redirectFileAppendBegin(std::string filename)
|
||||||
{
|
{
|
||||||
std::string filename_str(filename);
|
redirect_stream_ = fopen(filename.c_str(), "a");
|
||||||
redirect_stream_ = fopen(filename_str.c_str(), "a");
|
|
||||||
if (redirect_stream_ == nullptr)
|
if (redirect_stream_ == nullptr)
|
||||||
throw FileNotWritable(std::move(filename_str));
|
throw FileNotWritable(std::move(filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ ReportTcl::flush()
|
||||||
// Tcl_Main can eval multiple commands before the flushing the command
|
// Tcl_Main can eval multiple commands before the flushing the command
|
||||||
// output, so the log/redirect commands must force a flush.
|
// output, so the log/redirect commands must force a flush.
|
||||||
void
|
void
|
||||||
ReportTcl::logBegin(std::string_view filename)
|
ReportTcl::logBegin(std::string filename)
|
||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
Report::logBegin(filename);
|
Report::logBegin(filename);
|
||||||
|
|
@ -197,14 +197,14 @@ ReportTcl::logEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ReportTcl::redirectFileBegin(std::string_view filename)
|
ReportTcl::redirectFileBegin(std::string filename)
|
||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
Report::redirectFileBegin(filename);
|
Report::redirectFileBegin(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ReportTcl::redirectFileAppendBegin(std::string_view filename)
|
ReportTcl::redirectFileAppendBegin(std::string filename)
|
||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
Report::redirectFileAppendBegin(filename);
|
Report::redirectFileAppendBegin(filename);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue