Limbo 3.5.4
Loading...
Searching...
No Matches
Limbo.Parsers.TfParser

Introduction

Technology file (tf) is used as a configuration file in EDA tools for different technology nodes. It defines various properties like the layer mapping. Currently the parser reads mapping of layer name, layer id and layer abbreviation from the technology file.

Examples

Boost.Spirit Parser

See documented version: test/parsers/tf/test_spirit.cpp

#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;
{
void add_tf_layer_id(string const& s1, int32_t const& s2, string const& s3)
{
cout << __func__ << endl;
cout << s1 << ", " << s2 << ", " << s3 << endl;
}
};
void test1(string const& filename)
{
cout << "////////////// test1 ////////////////" << endl;
TfParser::read(db, filename);
}
int main(int argc, char** argv)
{
if (argc > 1)
{
test1(argv[1]);
}
else
cout << "at least 1 argument is required" << endl;
return 0;
}
tf parser for technology file
Custom class that inheritates TfParser::TfDataBase with all the required callbacks defined.
void add_tf_layer_id(string const &s1, int32_t const &s2, string const &s3)
add layer name, layer id, layer abbreviation
Base class for tf database. Only pure virtual functions are defined. User needs to inheritate this ...
Definition TfParser.h:62
static bool read(DataBaseType &db, const string &tfFile)
API to read tf file.
Definition TfParser.h:199
int main()
void test1()
test function API

Compiling and running commands (assuming LIMBO_DIR and BOOST_DIR are exported as the environment variable to the path where limbo library is installed)

g++ -o test_spirit test_spirit.cpp -I $LIMBO_DIR/include -I $BOOST_DIR/include
./test_spirit benchmarks/technology.tf

All Examples

References