Limbo 3.5.4
Loading...
Searching...
No Matches
DefDriver.h
Go to the documentation of this file.
1
7
8#ifndef DEFPARSER_DRIVER_H
9#define DEFPARSER_DRIVER_H
10
11#include "limbo/thirdparty/lefdef/5.8/def/def/defiNet.hpp"
12#include "limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.hpp"
13#include "limbo/thirdparty/lefdef/5.8/def/def/defiVia.hpp"
15
19namespace DefParser {
20
21using std::cout;
22using std::endl;
23using std::cerr;
24using std::string;
25using std::vector;
26using std::pair;
27using std::make_pair;
28using std::ostringstream;
29
30using defiVia = LefDefParser::defiVia;
31using defiNet = LefDefParser::defiNet;
32using defiTrack = LefDefParser::defiTrack;
33using defiGcellGrid = LefDefParser::defiGcellGrid;
42class Driver
43{
44public:
48
51
54
56 string streamname;
57
63 bool parse_stream(std::istream& in,
64 const string& sname = "stream input");
65
71 bool parse_string(const string& input,
72 const string& sname = "string stream");
73
79 bool parse_file(const string& filename);
80
83 Row const& row() const {return m_row;}
84 Row& row() {return m_row;}
85 Component const& component() const {return m_comp;}
86 Component& component() {return m_comp;}
87 Pin const& pin() const {return m_pin;}
88 Pin& pin() {return m_pin;}
89 Net const& net() const {return m_net;}
90 Net& net() {return m_net;}
91 Region const& region() const {return m_region;}
92 Region& region() {return m_region;}
93 Group const& group() const {return m_group;}
94 Group& group() {return m_group;}
95 Track const& track() const {return m_track;}
96 Track& track() {return m_track;}
97 GCellGrid const& gcellgrid() const {return m_gcellgrid;}
98 GCellGrid& gcellgrid() {return m_gcellgrid;}
99 // Via const& via() const {return m_via;}
100 // Via& via() {return m_via;}
101 // SNet const& snet() const {return m_snet;}
102 // SNet& snet() {return m_snet;}
104protected:
108
121
122 Track m_track;
123
124 GCellGrid m_gcellgrid;
125
126 Via m_via;
127
128 SNet m_snet;
129};
130
135bool read(DefDataBase& db, const string& defFile);
136
137} // namespace example
138
139#endif // EXAMPLE_DRIVER_H
Database for Def parser.
Base class for def database. Only pure virtual functions are defined. User needs to inheritate this...
bool trace_parsing
enable debug output in the bison parser
Definition DefDriver.h:53
bool parse_string(const string &input, const string &sname="string stream")
Group m_group
temporary group
Definition DefDriver.h:120
bool parse_file(const string &filename)
string streamname
stream name (file or input stream) used for error messages.
Definition DefDriver.h:56
Row m_row
temporary row
Definition DefDriver.h:110
Pin m_pin
temporary pin
Definition DefDriver.h:114
bool trace_scanning
enable debug output in the flex scanner
Definition DefDriver.h:50
bool parse_stream(std::istream &in, const string &sname="stream input")
Net m_net
temporary net
Definition DefDriver.h:116
Driver(DefDataBase &db)
Region m_region
temporary region
Definition DefDriver.h:118
DefDataBase & m_db
Definition DefDriver.h:107
Component m_comp
temporary component
Definition DefDriver.h:112
namespace for DefParser
Definition DefDataBase.h:26
bool read(DefDataBase &db, const string &defFile)
API for DefParser. Read DEF file and initialize database by calling user-defined callback functions.
cell in placement
routing tracks
group to describe cells corresponding to region
net to describe interconnection of netlist
pin of node/cell
region to describe regions like fence
placement row
Definition DefDataBase.h:71
routing tracks
routing tracks