Introduction
Bookshelf format is widely used in VLSI physical design such as placement and routing. It is originally developed by UCSD. The Bookshelf parser can read .aux file and extract all other files. Then it parses the rest files and invokes user-defined callback functions.
Examples
Flex/Bison Parser
See documented version: test/parsers/bookshelf/test_bison.cpp
#include <iostream>
#include <fstream>
using std::cout;
using std::cin;
using std::endl;
using std::string;
{
public:
{
cout << "BookshelfDataBase::" << __func__ << endl;
}
{
cout << __func__ << " => " << nn << ", " << nt << endl;
}
{
cout << __func__ << " => " << n << endl;
}
{
cout << __func__ << " => " << n << endl;
}
{
cout << __func__ << " => " << n << endl;
}
{
cout << __func__ << " => " << name << ", " << w << ", " << h << endl;
}
{
cout << __func__ << " => " << name << ", " << w << ", " << h << endl;
}
{
}
{
}
virtual void set_bookshelf_node_position(
string const& name,
double x,
double y,
string const& orient,
string const& status,
bool plFlag)
{
cout << __func__ << " => " << name << ", " << x << ", " << y << ", " << orient << ", " << status << ", plFlag = " << plFlag << endl;
}
{
cout << __func__ << " => " << name << endl;
}
{
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;
}
Compiling and running commands (assuming LIMBO_DIR is exported as the environment variable to the path where limbo library is installed)
1 g++ -o test_bison test_bison.cpp -I $LIMBO_DIR/include -L $LIMBO_DIR/lib -lbookshelfparser
2 ./test_bison benchmarks/simple/acc64.aux
All Examples
References