13 #ifndef GDFPARSER_DATABASE_H
14 #define GDFPARSER_DATABASE_H
36 typedef unsigned int uint32_t;
46 typedef vector<int> base_type;
47 using base_type::size_type;
48 using base_type::value_type;
49 using base_type::allocator_type;
60 IntegerArray(size_type n,
const value_type& val,
const allocator_type& alloc = allocator_type())
61 : base_type(n, val, alloc) {}
70 typedef vector<double> base_type;
71 using base_type::size_type;
72 using base_type::value_type;
73 using base_type::allocator_type;
84 NumberArray(size_type n,
const value_type& val,
const allocator_type& alloc = allocator_type())
85 : base_type(n, val, alloc) {}
94 typedef vector<string> base_type;
95 using base_type::size_type;
96 using base_type::value_type;
97 using base_type::allocator_type;
103 : base_type(alloc) {}
108 StringArray(size_type n,
const value_type& val,
const allocator_type& alloc = allocator_type())
109 : base_type(n, val, alloc) {}
117 virtual void print(ostream&)
const {};
147 virtual void print(ostream& ss)
const
149 ss <<
"(" << x <<
"," << y <<
")";
196 case CellPort::INOUT:
197 ss <<
"INOUT";
break;
198 case CellPort::POWER:
199 ss <<
"POWER";
break;
200 case CellPort::GROUND:
201 ss <<
"GROUND";
break;
202 case CellPort::UNKNOWN:
204 ss <<
"UNKNOWN";
break;
210 virtual void print(ostream& ss)
const
212 ss <<
"//////// CellPort ////////" << endl
213 <<
"name = " << name << endl
214 <<
"layer = " << layer << endl
215 <<
"point = " << point << endl
216 <<
"type = " << portType << endl;
238 virtual void print(ostream& ss)
const
240 ss <<
"//////// CellInstance ////////" << endl
241 <<
"name = " << name << endl
242 <<
"cellType = " << cellType << endl
243 <<
"position = " << position << endl
244 <<
"orient = " << orient << endl;
274 pathObjType = UNKNOWN;
302 virtual void print(ostream& ss)
const
304 ss <<
"//////// Path ////////" << endl
305 <<
"name = " << name << endl;
306 ss <<
"path objects\n";
307 for (uint32_t i = 0; i < vPathObj.size(); ++i)
308 ss <<
"name = " << vPathObj[i].name <<
" "
309 <<
"layer = " << vPathObj[i].layer <<
" "
310 <<
"width = " << vPathObj[i].width <<
" "
311 <<
"startPoint = " << vPathObj[i].startPoint <<
" "
312 <<
"endPoint = " << vPathObj[i].endPoint <<
" "
329 HORIZONTAL_WIRE_COSTS,
352 virtual void print(ostream& ss)
const
354 ss <<
"//////// Text ////////" << endl
355 <<
"name = " << name << endl;
356 ss <<
"content = " << content << endl;
397 virtual void print(ostream& ss)
const
399 ss <<
"//////// Net ////////" << endl
400 <<
"name = " << name << endl;
401 for (uint32_t i = 0; i < vNetPort.size(); ++i)
402 ss <<
"(" << vNetPort[i].name <<
", " << vNetPort[i].instName <<
") ";
427 vCellInstance.clear();
433 virtual void print(ostream& ss)
const
435 ss <<
"//////// Cell ////////" << endl
436 <<
"name = " << name << endl;
437 for (uint32_t i = 0; i < vCellPort.size(); ++i)
439 for (uint32_t i = 0; i < vPath.size(); ++i)
441 for (uint32_t i = 0; i < vCellInstance.size(); ++i)
442 ss << vCellInstance[i];
443 for (uint32_t i = 0; i < vNet.size(); ++i)
445 for (uint32_t i = 0; i < vText.size(); ++i)
friend ostream & operator<<(ostream &ss, Item const &rhs)
IntegerArray(const allocator_type &alloc=allocator_type())
NumberArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
std::vector< CellInstance > vCellInstance
array of instances
bison does not support vector very well, so here create a dummy class for string array.
std::vector< Net > vNet
interconnections
Temporary data structures to hold parsed data. Base class for all temporary data structures.
Point startPoint
starting point
virtual void print(ostream &ss) const
print data members
TextTypeEnum textType
test type
virtual void print(ostream &ss) const
print data members
virtual void print(ostream &ss) const
print data members
virtual void print(ostream &) const
print data members
std::string name
path name
std::string content
content of text
std::string cellType
standard cell type
std::vector< PathObj > vPathObj
objects on the path
Base class for def database. Only pure virtual functions are defined. User needs to inheritate this c...
std::string name
instance name
std::string instName
corresponding instance name, empty for PI/PO
PortTypeEnum portType
port type
void reset()
reset all data members
bison does not support vector very well, so here create a dummy class for integer array...
void reset()
reset all data members
virtual void print(ostream &ss) const
print data members
virtual void print(ostream &ss) const
print data members
the whole routing layout is describe by a cell
Point endPoint
not always valid
std::vector< NetPort > vNetPort
array of net ports
void reset()
reset all data members
IntegerArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
PathObjTypeEnum
type of path object
virtual void print(ostream &ss) const
print data members
std::vector< Path > vPath
array of paths
void reset()
reset all data members
std::vector< Text > vText
texts
NumberArray(const allocator_type &alloc=allocator_type())
std::string name
more information for textType
void reset()
reset all data members
friend ostream & operator<<(ostream &ss, CellPort::PortTypeEnum portType)
print port type
PathObjTypeEnum pathObjType
path object type
int32_t orient
instance orientation
void reset()
reset all data memory
virtual void print(ostream &ss) const
print data members
std::string name
port name
void reset()
reset all data members
Point position
instance position
std::string name
only valid when pathObjType is STRING
StringArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
void reset()
reset all data members
virtual void add_gdf_cell(Cell &)=0
Add routing cell. It is safe to directly swap the contents in the cell for efficiency.
std::vector< CellPort > vCellPort
array of ports
bison does not support vector very well, so here create a dummy class for floating point number array...
std::string layer
layer name
StringArray(const allocator_type &alloc=allocator_type())
void reset()
reset all data members