#include <iostream>
#include <fstream>
using std::cout;
using std::cin;
using std::endl;
using std::string;
{
public:
{
cout << "DefDataBase::" << __func__ << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ << " => " << t1 << "," << t2 << "," << t3 << "," << t4 << endl;
}
{
cout << __func__ << endl;
}
{
cout << __func__ <<
": " << c.
comp_name <<
": status = " << c.
status << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ <<
": " << p.
pin_name << endl;
}
{
cout << __func__ << " => " << token << endl;
}
{
}
{
cout << __func__ << " => " << token << endl;
}
{
cout << __func__ << " => " << n << endl;
}
{
cout << __func__ << " => ";
for (std::vector<std::vector<int> >::const_iterator it = vBbox.begin(); it != vBbox.end(); ++it)
cout << "(" << (*it)[0] << ", " << (*it)[1] << ", " << (*it)[2] << ", " << (*it)[3] << ") ";
cout << endl;
}
{
cout << __func__ << " => " << n << endl;
}
{
cout << __func__ << "\n" << region;
}
{
cout << __func__ << " => " << n << endl;
}
{
cout << __func__ << "\n" << group;
}
{
cout << __func__ << endl;
}
};
void test1(
string const& filename)
{
cout << "////////////// test1 ////////////////" << endl;
}
void test2(
string const& filename)
{
cout << "////////////// test2 ////////////////" << endl;
driver.parse_file(filename);
}
int main(
int argc,
char** argv)
{
if (argc > 1)
{
}
else
cout << "at least 1 argument is required" << endl;
return 0;
}
Custom class that inheritates DefParser::DefDataBase with all the required callbacks defined.
virtual void add_def_region(DefParser::Region const ®ion)
add region
virtual void resize_def_blockage(int n)
set number of blockages
virtual void add_def_pin(DefParser::Pin const &p)
add pin
virtual void resize_def_net(int token)
set number of nets
virtual void set_def_unit(int token)
virtual void resize_def_pin(int token)
set number of pins
virtual void add_def_net(DefParser::Net const &n)
add net
virtual void set_def_dividerchar(string const &token)
virtual void end_def_design()
end of design
virtual void resize_def_region(int n)
set number of regions
virtual void set_def_version(string const &token)
virtual void resize_def_component(int token)
virtual void add_def_placement_blockage(std::vector< std::vector< int > > const &vBbox)
add placement blockages
virtual void set_def_design(string const &token)
virtual void add_def_row(DefParser::Row const &)
add row
virtual void resize_def_group(int n)
set number of groups
virtual void add_def_group(DefParser::Group const &group)
add group
virtual void add_def_component(DefParser::Component const &c)
add component
virtual void set_def_busbitchars(string const &token)
virtual void set_def_diearea(int t1, int t2, int t3, int t4)
Base class for def database. Only pure virtual functions are defined. User needs to inheritate this...
bool read(DefDataBase &db, const string &defFile)
API for DefParser. Read DEF file and initialize database by calling user-defined callback functions.
string status
placement status
string comp_name
component name
int32_t net_weight
net weight
void test2(string const &filename)
test std::list
void test1()
test function API
Compiling and running commands (assuming LIMBO_DIR is exported as the environment variable to the path where limbo library is installed)
Copyright 2012 - 2016, Cadence Design Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.