13#ifndef GDFPARSER_DATABASE_H
14#define GDFPARSER_DATABASE_H
36typedef unsigned int uint32_t;
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) {}
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) {}
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
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;
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)
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)
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)
443 for (uint32_t i = 0; i <
vNet.size(); ++i)
445 for (uint32_t i = 0; i <
vText.size(); ++i)
Base class for def database. Only pure virtual functions are defined. User needs to inheritate this...
virtual void add_gdf_cell(Cell &)=0
Add routing cell. It is safe to directly swap the contents in the cell for efficiency.
IntegerArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
IntegerArray(const allocator_type &alloc=allocator_type())
NumberArray(const allocator_type &alloc=allocator_type())
NumberArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
StringArray(const allocator_type &alloc=allocator_type())
StringArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
the whole routing layout is describe by a cell
std::vector< Path > vPath
array of paths
std::vector< Net > vNet
interconnections
std::vector< CellInstance > vCellInstance
array of instances
void reset()
reset all data members
std::vector< Text > vText
texts
std::vector< CellPort > vCellPort
array of ports
virtual void print(ostream &ss) const
print data members
int32_t orient
instance orientation
std::string name
instance name
void reset()
reset all data members
std::string cellType
standard cell type
virtual void print(ostream &ss) const
print data members
Point position
instance position
virtual void print(ostream &ss) const
print data members
PortTypeEnum portType
port type
friend ostream & operator<<(ostream &ss, CellPort::PortTypeEnum portType)
print port type
void reset()
reset all data memory
Temporary data structures to hold parsed data. Base class for all temporary data structures.
virtual void print(ostream &) const
print data members
friend ostream & operator<<(ostream &ss, Item const &rhs)
void reset()
reset all data members
virtual void print(ostream &ss) const
print data members
std::vector< NetPort > vNetPort
array of net ports
void reset()
reset all data members
std::string name
port name
std::string instName
corresponding instance name, empty for PI/PO
void reset()
reset all data members
std::string name
path name
virtual void print(ostream &ss) const
print data members
std::vector< PathObj > vPathObj
objects on the path
Point startPoint
starting point
PathObjTypeEnum
type of path object
PathObjTypeEnum pathObjType
path object type
void reset()
reset all data members
std::string layer
layer name
std::string name
only valid when pathObjType is STRING
Point endPoint
not always valid
void reset()
reset all data members
virtual void print(ostream &ss) const
print data members
std::string name
more information for textType
std::string content
content of text
virtual void print(ostream &ss) const
print data members
TextTypeEnum textType
test type
void reset()
reset all data members