Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odb: split LefDefParser namespace into LefParser and DefParser #6396

Merged
merged 13 commits into from
Jan 5, 2025
54 changes: 27 additions & 27 deletions src/odb/include/odb/lefin.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "odb.h"
#include "utl/Logger.h"

namespace LefDefParser {
namespace LefParser {
class lefiArray;
struct lefiNoiseMargin;
class lefiNoiseTable;
Expand All @@ -64,7 +64,7 @@ class lefiMaxStackVia;
class lefiObstruction;
class lefiGeometries;
struct lefiGeomPolygon;
} // namespace LefDefParser
} // namespace LefParser

namespace odb {

Expand All @@ -77,8 +77,6 @@ class dbDatabase;
class dbTechLayer;
class dbSite;

using namespace LefDefParser;

class lefin
{
dbDatabase* _db;
Expand Down Expand Up @@ -114,12 +112,14 @@ class lefin

bool readLefInner(const char* lef_file);
bool readLef(const char* lef_file);
bool addGeoms(dbObject* object, bool is_pin, lefiGeometries* geometry);
bool addGeoms(dbObject* object,
bool is_pin,
LefParser::lefiGeometries* geometry);
void createLibrary();
void createPolygon(dbObject* object,
bool is_pin,
dbTechLayer* layer,
lefiGeomPolygon* p,
LefParser::lefiGeomPolygon* p,
int design_rule_width,
double offset_x = 0.0,
double offset_y = 0.0);
Expand All @@ -141,47 +141,47 @@ class lefin

void antenna(AntennaType type, double value);
void arrayBegin(const char* name);
void array(lefiArray* a);
void array(LefParser::lefiArray* a);
void arrayEnd(const char* name);
int busBitChars(const char* busBit);
void caseSense(int caseSense);
void clearance(const char* name);
void divider(const char* name);
void noWireExt(const char* name);
void noiseMargin(lefiNoiseMargin* noise);
void noiseMargin(LefParser::lefiNoiseMargin* noise);
void edge1(double value);
void edge2(double value);
void edgeScale(double value);
void noiseTable(lefiNoiseTable* noise);
void correction(lefiCorrectionTable* corr);
void noiseTable(LefParser::lefiNoiseTable* noise);
void correction(LefParser::lefiCorrectionTable* corr);
void dielectric(double dielectric);
void irdropBegin(void* ptr);
void irdrop(lefiIRDrop* irdrop);
void irdrop(LefParser::lefiIRDrop* irdrop);
void irdropEnd(void* ptr);
void layer(lefiLayer* layer);
void layer(LefParser::lefiLayer* layer);
void macroBegin(const char* macroName);
void macro(lefiMacro* macro);
void macro(LefParser::lefiMacro* macro);
void macroEnd(const char* macroName);
void manufacturing(double num);
void maxStackVia(lefiMaxStackVia* maxStack);
void minFeature(lefiMinFeature* min);
void nonDefault(lefiNonDefault* def);
void obstruction(lefiObstruction* obs);
void pin(lefiPin* pin);
void maxStackVia(LefParser::lefiMaxStackVia* maxStack);
void minFeature(LefParser::lefiMinFeature* min);
void nonDefault(LefParser::lefiNonDefault* def);
void obstruction(LefParser::lefiObstruction* obs);
void pin(LefParser::lefiPin* pin);
void propDefBegin(void* ptr);
void propDef(lefiProp* prop);
void propDef(LefParser::lefiProp* prop);
void propDefEnd(void* ptr);
void site(lefiSite* site);
void site(LefParser::lefiSite* site);
void spacingBegin(void* ptr);
void spacing(lefiSpacing* spacing);
void spacing(LefParser::lefiSpacing* spacing);
void spacingEnd(void* ptr);
void timing(lefiTiming* timing);
void units(lefiUnits* unit);
void useMinSpacing(lefiUseMinSpacing* spacing);
void timing(LefParser::lefiTiming* timing);
void units(LefParser::lefiUnits* unit);
void useMinSpacing(LefParser::lefiUseMinSpacing* spacing);
void version(double num);
void via(lefiVia* via, dbTechNonDefaultRule* rule = nullptr);
void viaRule(lefiViaRule* viaRule);
void viaGenerateRule(lefiViaRule* viaRule);
void via(LefParser::lefiVia* via, dbTechNonDefaultRule* rule = nullptr);
void viaRule(LefParser::lefiViaRule* viaRule);
void viaGenerateRule(LefParser::lefiViaRule* viaRule);
void done(void* ptr);
template <typename... Args>
void warning(int id, std::string msg, const Args&... args)
Expand Down
44 changes: 22 additions & 22 deletions src/odb/src/def/cdef/xdefiAssertion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,97 +39,97 @@
// Wrappers definitions.
int defiAssertion_isAssertion(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->isAssertion();
return ((DefParser::defiAssertion*) obj)->isAssertion();
}

int defiAssertion_isConstraint(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->isConstraint();
return ((DefParser::defiAssertion*) obj)->isConstraint();
}

int defiAssertion_isWiredlogic(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->isWiredlogic();
return ((DefParser::defiAssertion*) obj)->isWiredlogic();
}

int defiAssertion_isDelay(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->isDelay();
return ((DefParser::defiAssertion*) obj)->isDelay();
}

int defiAssertion_isSum(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->isSum();
return ((DefParser::defiAssertion*) obj)->isSum();
}

int defiAssertion_isDiff(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->isDiff();
return ((DefParser::defiAssertion*) obj)->isDiff();
}

int defiAssertion_hasRiseMin(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->hasRiseMin();
return ((DefParser::defiAssertion*) obj)->hasRiseMin();
}

int defiAssertion_hasRiseMax(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->hasRiseMax();
return ((DefParser::defiAssertion*) obj)->hasRiseMax();
}

int defiAssertion_hasFallMin(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->hasFallMin();
return ((DefParser::defiAssertion*) obj)->hasFallMin();
}

int defiAssertion_hasFallMax(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->hasFallMax();
return ((DefParser::defiAssertion*) obj)->hasFallMax();
}

double defiAssertion_riseMin(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->riseMin();
return ((DefParser::defiAssertion*) obj)->riseMin();
}

double defiAssertion_riseMax(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->riseMax();
return ((DefParser::defiAssertion*) obj)->riseMax();
}

double defiAssertion_fallMin(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->fallMin();
return ((DefParser::defiAssertion*) obj)->fallMin();
}

double defiAssertion_fallMax(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->fallMax();
return ((DefParser::defiAssertion*) obj)->fallMax();
}

const char* defiAssertion_netName(const ::defiAssertion* obj)
{
return ((const LefDefParser::defiAssertion*) obj)->netName();
return ((const DefParser::defiAssertion*) obj)->netName();
}

double defiAssertion_distance(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->distance();
return ((DefParser::defiAssertion*) obj)->distance();
}

int defiAssertion_numItems(const ::defiAssertion* obj)
{
return ((LefDefParser::defiAssertion*) obj)->numItems();
return ((DefParser::defiAssertion*) obj)->numItems();
}

int defiAssertion_isPath(const ::defiAssertion* obj, int index)
{
return ((LefDefParser::defiAssertion*) obj)->isPath(index);
return ((DefParser::defiAssertion*) obj)->isPath(index);
}

int defiAssertion_isNet(const ::defiAssertion* obj, int index)
{
return ((LefDefParser::defiAssertion*) obj)->isNet(index);
return ((DefParser::defiAssertion*) obj)->isNet(index);
}

void defiAssertion_path(const ::defiAssertion* obj,
Expand All @@ -139,16 +139,16 @@ void defiAssertion_path(const ::defiAssertion* obj,
char** toInst,
char** toPin)
{
((LefDefParser::defiAssertion*) obj)
((DefParser::defiAssertion*) obj)
->path(index, fromInst, fromPin, toInst, toPin);
}

void defiAssertion_net(const ::defiAssertion* obj, int index, char** netName)
{
((LefDefParser::defiAssertion*) obj)->net(index, netName);
((DefParser::defiAssertion*) obj)->net(index, netName);
}

void defiAssertion_print(const ::defiAssertion* obj, FILE* f)
{
((LefDefParser::defiAssertion*) obj)->print(f);
((DefParser::defiAssertion*) obj)->print(f);
}
Loading
Loading