torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VerilogExample.cpp File Reference

Example program to read in a structural Verilog file and write it back out. More...

#include "torc/Generic.hpp"
#include <fstream>
+ Include dependency graph for VerilogExample.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Standard main() function. More...
 

Detailed Description

Example program to read in a structural Verilog file and write it back out.

Definition in file VerilogExample.cpp.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Standard main() function.

Definition at line 23 of file VerilogExample.cpp.

23  {
24 
25  // import the XDL design
26  if(argc < 2) return 0;
27  std::string inFileName(argv[1]);
29  //importer(inFileName); // if no other parameters are required
30  importer(inFileName, "-v cp65npksdst.v"); // if a cell library or other parameters are required
31 
32  // look up the design (and do something with it ...)
33  torc::generic::RootSharedPtr rootPtr = importer.getRootPtr();
34 
35  torc::generic::VerilogExporter exporter(rootPtr);
36  exporter(boost::filesystem::path("output.v"));
37 
38  return 0;
39 }
Importer from structural verilog format into a generic design.
std::string string
boost::filesystem::path path
Exporter from a generic netlist into structural verilog.
RootSharedPtr getRootPtr(void)
Returns a shared pointer for the root.
boost::shared_ptr< Root > RootSharedPtr

+ Here is the call graph for this function: