spef reader use std::string
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
d7905a3886
commit
ab99512351
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "Report.hh"
|
#include "Report.hh"
|
||||||
#include "StringUtil.hh"
|
#include "StringUtil.hh"
|
||||||
#include "StringSeq.hh"
|
#include "StringUtil.hh"
|
||||||
#include "parasitics/SpefReaderPvt.hh"
|
#include "parasitics/SpefReaderPvt.hh"
|
||||||
#include "parasitics/SpefScanner.hh"
|
#include "parasitics/SpefScanner.hh"
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ sta::SpefParse::error(const location_type &loc,
|
||||||
char *string;
|
char *string;
|
||||||
int integer;
|
int integer;
|
||||||
float number;
|
float number;
|
||||||
sta::StringSeq *string_seq;
|
sta::StdStringSeq *std_string_seq;
|
||||||
sta::PortDirection *port_dir;
|
sta::PortDirection *port_dir;
|
||||||
sta::SpefRspfPi *pi;
|
sta::SpefRspfPi *pi;
|
||||||
sta::SpefTriple *triple;
|
sta::SpefTriple *triple;
|
||||||
|
|
@ -105,7 +105,7 @@ sta::SpefParse::error(const location_type &loc,
|
||||||
|
|
||||||
%type <ch> hchar suffix_bus_delim prefix_bus_delim
|
%type <ch> hchar suffix_bus_delim prefix_bus_delim
|
||||||
|
|
||||||
%type <string_seq> qstrings
|
%type <std_string_seq> qstrings
|
||||||
%type<port_dir> direction
|
%type<port_dir> direction
|
||||||
|
|
||||||
%type<triple> par_value total_cap
|
%type<triple> par_value total_cap
|
||||||
|
|
@ -220,11 +220,14 @@ design_flow:
|
||||||
|
|
||||||
qstrings:
|
qstrings:
|
||||||
QSTRING
|
QSTRING
|
||||||
{ $$ = new sta::StringSeq;
|
{ $$ = new sta::StdStringSeq;
|
||||||
$$->push_back($1);
|
$$->push_back($1);
|
||||||
|
sta::stringDelete($1);
|
||||||
}
|
}
|
||||||
| qstrings QSTRING
|
| qstrings QSTRING
|
||||||
{ $$->push_back($2); }
|
{ $$->push_back($2);
|
||||||
|
sta::stringDelete($2);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
hierarchy_div_def:
|
hierarchy_div_def:
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,6 @@ SpefReader::SpefReader(const std::string &filename,
|
||||||
cap_scale_(1.0),
|
cap_scale_(1.0),
|
||||||
res_scale_(1.0),
|
res_scale_(1.0),
|
||||||
induct_scale_(1.0),
|
induct_scale_(1.0),
|
||||||
design_flow_(nullptr),
|
|
||||||
parasitics_(parasitics),
|
parasitics_(parasitics),
|
||||||
parasitic_(nullptr)
|
parasitic_(nullptr)
|
||||||
{
|
{
|
||||||
|
|
@ -101,11 +100,6 @@ SpefReader::SpefReader(const std::string &filename,
|
||||||
|
|
||||||
SpefReader::~SpefReader()
|
SpefReader::~SpefReader()
|
||||||
{
|
{
|
||||||
if (design_flow_) {
|
|
||||||
deleteContents(design_flow_);
|
|
||||||
delete design_flow_;
|
|
||||||
design_flow_ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -297,9 +291,10 @@ SpefReader::portDirection(char *spef_dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SpefReader::setDesignFlow(StringSeq *flow)
|
SpefReader::setDesignFlow(StdStringSeq *flow)
|
||||||
{
|
{
|
||||||
design_flow_ = flow;
|
design_flow_ = std::move(*flow);
|
||||||
|
delete flow;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pin *
|
Pin *
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "Zlib.hh"
|
#include "Zlib.hh"
|
||||||
#include "StringSeq.hh"
|
#include "StringUtil.hh"
|
||||||
#include "NetworkClass.hh"
|
#include "NetworkClass.hh"
|
||||||
#include "ParasiticsClass.hh"
|
#include "ParasiticsClass.hh"
|
||||||
#include "StaState.hh"
|
#include "StaState.hh"
|
||||||
|
|
@ -82,7 +82,7 @@ public:
|
||||||
void makeNameMapEntry(const char *index,
|
void makeNameMapEntry(const char *index,
|
||||||
const char *name);
|
const char *name);
|
||||||
const char *nameMapLookup(const char *index);
|
const char *nameMapLookup(const char *index);
|
||||||
void setDesignFlow(StringSeq *flow_keys);
|
void setDesignFlow(StdStringSeq *flow_keys);
|
||||||
Pin *findPin(char *name);
|
Pin *findPin(char *name);
|
||||||
Net *findNet(const char *name);
|
Net *findNet(const char *name);
|
||||||
void rspfBegin(Net *net,
|
void rspfBegin(Net *net,
|
||||||
|
|
@ -139,7 +139,7 @@ private:
|
||||||
float res_scale_;
|
float res_scale_;
|
||||||
float induct_scale_;
|
float induct_scale_;
|
||||||
SpefNameMap name_map_;
|
SpefNameMap name_map_;
|
||||||
StringSeq *design_flow_;
|
StdStringSeq design_flow_;
|
||||||
Parasitics *parasitics_;
|
Parasitics *parasitics_;
|
||||||
Parasitic *parasitic_;
|
Parasitic *parasitic_;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue