diff --git a/alliance/src/a2sdf/Makefile.am b/alliance/src/a2sdf/Makefile.am deleted file mode 100644 index 77a6deb6..00000000 --- a/alliance/src/a2sdf/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS = src doc diff --git a/alliance/src/a2sdf/configure.in b/alliance/src/a2sdf/configure.in deleted file mode 100644 index b2b40159..00000000 --- a/alliance/src/a2sdf/configure.in +++ /dev/null @@ -1,36 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/IOPath.cpp) - -A2SDF_MAJOR_VERSION=0 -A2SDF_MINOR_VERSION=9b -A2SDF_VERSION=$A2SDF_MAJOR_VERSION.$A2SDF_MINOR_VERSION - -AC_SUBST(A2SDF_MAJOR_VERSION) -AC_SUBST(A2SDF_MINOR_VERSION) -AC_SUBST(A2SDF_VERSION) - -# For automake. -VERSION=$A2SDF_VERSION -PACKAGE=a2sdf - -dnl Initialize automake stuff -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) - -dnl Checks for programs. -AC_PROG_CXX -AC_PROG_RANLIB -AC_PROG_MAKE_SET - -dnl Checks for libraries. - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -AM_PATH_POPT -AM_ALLIANCE - -AC_OUTPUT([ -Makefile -src/Makefile -doc/Makefile -]) diff --git a/alliance/src/a2sdf/doc/Makefile.am b/alliance/src/a2sdf/doc/Makefile.am deleted file mode 100644 index 677ca920..00000000 --- a/alliance/src/a2sdf/doc/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -## Process this file with automake to produce Makefile.in - -man_MANS = a2sdf.1 -EXTRA_DIST = $(man_MANS) diff --git a/alliance/src/a2sdf/doc/a2sdf.1 b/alliance/src/a2sdf/doc/a2sdf.1 deleted file mode 100644 index bc39a271..00000000 --- a/alliance/src/a2sdf/doc/a2sdf.1 +++ /dev/null @@ -1,39 +0,0 @@ -.pl -.4 -.TH A2SDF 1 "December 09, 2002" "ASIM/LIP6" "CAO\-VLSI Reference Manual" -.SH NAME -.TP -a2sdf - - alliance to sdf format converter -.so man1/alc_origin.1 -.SH SYNOPSIS -.TP -\fBa2sdf\fP -[\fBoptions\fP] \fIcells_dir\fP \fIoutputname\fP -.br - -.SH DESCRIPTION -\fBa2sdf\fP translates the SXLIB library to the SDF format. Please refer to -http://www.eda.org/sdf/ for more information on SDF format. -.br -Only the SXLIB library has got timing informations at the moment, so it's -the only library we are able to convert. -.br -\fBcells directory\fP -.br -The path to the SXLIB cells directory. -.br -\fBoutput name\fP -.br -Just the name of the file containing the timing information in sdf format. -It should be named with a .sdf extension. -.br - -.SH OPTIONS -.PP -\fB-v[ersion]\fP displays the tool's version. -.br -\fB-h[elp]\fP displays a small help message. -.br -\fB-V[erbose]\fP sets the verbose mode on. -.br -.so man1/alc_bug_report.1 diff --git a/alliance/src/a2sdf/popt.m4 b/alliance/src/a2sdf/popt.m4 deleted file mode 100644 index a0147dc4..00000000 --- a/alliance/src/a2sdf/popt.m4 +++ /dev/null @@ -1,56 +0,0 @@ -dnl AM_PATH_POPT([ACTION-IF-FOUND]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -AC_DEFUN(AM_PATH_POPT,[ - AC_ARG_WITH(popt-prefix, - [ --with-popt-prefix=PFX Prefix where popt is installed (optional)], - popt_prefix="$withval", popt_prefix="") - - if test x$popt_prefix != x ; then - POPT_CFLAGS="-I$popt_prefix/include" - POPT_LIBS="-L$popt_prefix/lib -lpopt" - else - POPT_CFLAGS="" - POPT_LIBS="-lpopt" - fi - - AC_MSG_CHECKING(for popt library) - - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $POPT_CFLAGS" - LIBS="$POPT_LIBS $LIBS" - - AC_TRY_RUN([ -#include - -int main(int argc, const char** argv) -{ - struct poptOption options[] = { - POPT_AUTOHELP - { NULL, 0, 0, NULL, 0 } - }; - - poptContext context = poptGetContext("popt-test", argc, argv, options, 0); - poptGetNextOpt(context); - - return 0; -} -],, no_popt=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - - if test "x$no_popt" = x ; then - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - AC_MSG_RESULT(no) - AC_MSG_ERROR([This version of $PACKAGE requires libpopt: - ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/]) - POPT_CFLAGS="" - POPT_LIBS="" -dnl ifelse([$2], , :, [$2]) - fi - - AC_SUBST(POPT_CFLAGS) - AC_SUBST(POPT_LIBS) -]) diff --git a/alliance/src/a2sdf/src/A2Sdf.cpp b/alliance/src/a2sdf/src/A2Sdf.cpp deleted file mode 100644 index 144ad6f1..00000000 --- a/alliance/src/a2sdf/src/A2Sdf.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "A2Sdf.h" - -#include -#include -#include -#include -#include -#include - -/*for inputs to output: Tphl_i_t */ -#define Tphl "tphl" -#define Tpll "tpll" -#define Tplh "tplh" -#define Tphh "tphh" - -/*for flip-flop*/ -#define Tsr "tsr" /* tsr_i_ck */ -#define Tsf "tsf" /* tsf_i_ck */ -#define Thr "thr" /* thr_i_ck */ -#define Thf "thf" /* thf_i_ck */ -#define Tar "tar" /* tar_ck_q */ -#define Taf "taf" /* taf_ck_q */ - - -A2Sdf::~A2Sdf() -{ - for (TimingCells::iterator it = _timingCells.begin(); - it != _timingCells.end(); - it++) - { - delete *it; - } - -} - -void -A2Sdf::CreateTimingCell(const char* name) -{ - char* Thl, *Tll, *Tlh, *Thh, *tar, *taf; - TimingCell* timingCell = new TimingCell(name); - _timingCells.push_back(timingCell); - - befig_list* befig = vhdlloadbefig(NULL,const_cast(name),0/*don't dump message*/); - assert(befig); - - if (_verbose) - { - cout << " o Treating cell: " << name << endl; - } - - list outs; - for (const bepor_list* bepor=befig->BEPOR; bepor; bepor=bepor->NEXT) - { - if (isvdd(bepor->NAME) || isvss(bepor->NAME)) continue; - if (bepor->DIRECTION == OUT || bepor->DIRECTION == INOUT) - { - outs.push_back(bepor->NAME); - } - } - - for (list::const_iterator lit = outs.begin(); - lit != outs.end(); - lit++) - { - const char* output = *lit; - for (const bepor_list* bepor=befig->BEPOR; bepor; bepor=bepor->NEXT) - { - char* newCon = bepor->NAME; - if (newCon == output) continue; - if (isvdd(newCon) || isvss(newCon)) continue; - if (bepor->DIRECTION == IN || bepor->DIRECTION == INOUT) - { - char memo=SEPAR; - SEPAR='_'; - Thl=concatname(Tphl,newCon); - Tll=concatname(Tpll,newCon); - Thh=concatname(Tphh,newCon); - Tlh=concatname(Tplh,newCon); - tar=concatname(Tar,newCon); - taf=concatname(Taf,newCon); - Thl=concatname(Thl,output); - Tll=concatname(Tll,output); - Thh=concatname(Thh,output); - Tlh=concatname(Tlh,output); - tar=concatname(tar,output); - taf=concatname(taf,output); - SEPAR=memo; - - for (const begen_list* begen=befig->BEGEN; begen; begen=begen->NEXT) - { - if (begen->NAME==Tlh || begen->NAME==Thh) - { - IOPath* ioPath = timingCell->AddIOPath(newCon, output); - ioPath->CreateRisingPath(*(int*)begen->VALUE); - } - if (begen->NAME==Thl || begen->NAME==Tll) - { - IOPath* ioPath = timingCell->AddIOPath(newCon, output); - ioPath->CreateFallingPath(*(int*)begen->VALUE); - } - } - } - } - } -} - -void -A2Sdf::Dump() const -{ - ofstream out(_fileName); - out << "(DELAYFILE" << endl - << " (SDFVERSION \"3.0\")" << endl - << " (VENDOR \"ASIM/LIP6\")" << endl - << " (VERSION \"1.0b\")" << endl - << " (TIMESCALE 1 ps)" << endl; - for (TimingCells::const_iterator it = _timingCells.begin(); - it != _timingCells.end(); - it++) - { - (*it)->Dump(out); - } - out << ")" << endl; -} diff --git a/alliance/src/a2sdf/src/A2Sdf.h b/alliance/src/a2sdf/src/A2Sdf.h deleted file mode 100644 index 613ba2c5..00000000 --- a/alliance/src/a2sdf/src/A2Sdf.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __A2SDF_H -#define __A2SDF_H - -#include -#include "TimingCell.h" -using namespace std; - -class A2Sdf -{ - public: - typedef list TimingCells; - private: - bool _verbose; - const char* _fileName; - TimingCells _timingCells; - public: - A2Sdf(const char* filename, bool verbose) - : _verbose(verbose) - , _fileName(filename) - , _timingCells() - {} - - ~A2Sdf(); - void CreateTimingCell(const char* name); - void Dump() const; -}; - -#endif /* __A2SDF_H */ diff --git a/alliance/src/a2sdf/src/IOPath.cpp b/alliance/src/a2sdf/src/IOPath.cpp deleted file mode 100644 index 76cd9b97..00000000 --- a/alliance/src/a2sdf/src/IOPath.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "IOPath.h" - -IOPath::~IOPath() -{ - if (_risingPath) - delete _risingPath; - if (_fallingPath) - delete _fallingPath; -} - -void -IOPath::CreateRisingPath(const int value) -{ - if (!_risingPath) - _risingPath = new TimePath(value); - else - _risingPath->PutValue(value); -} - -void -IOPath::CreateFallingPath(const int value) -{ - if (!_fallingPath) - _fallingPath = new TimePath(value); - else - _fallingPath->PutValue(value); -} - -ofstream& -IOPath::Dump(ofstream& out) const -{ - out << " (IOPATH " - << _input - << " " - << _output - << " "; - if (_risingPath) - { - out << "(" << _risingPath->GetWorstValue() - << "::" - << _risingPath->GetBestValue() - << ") "; - } - else - out << "() "; - if (_fallingPath) - { - out << "(" << _fallingPath->GetWorstValue() - << "::" - << _fallingPath->GetBestValue() - << ") "; - } - else - out << "() "; - - out << ")" << endl; - return out; -} diff --git a/alliance/src/a2sdf/src/IOPath.h b/alliance/src/a2sdf/src/IOPath.h deleted file mode 100644 index f91de327..00000000 --- a/alliance/src/a2sdf/src/IOPath.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __IO_PATH_H -#define __IO_PATH_H - -#include -using namespace std; - -class TimePath -{ - friend class IOPath; - private: - int _worstValue; - int _bestValue; - TimePath(const int value): - _worstValue(value), _bestValue(value) - {} - void PutValue(const int value) - { - if (value < _worstValue) - _worstValue = value; - else - if (value > _bestValue) - _bestValue = value; - } - int GetWorstValue() const { return _worstValue; } - int GetBestValue() const { return _bestValue; } -}; - -class IOPath -{ - private: - const char* _input; - const char* _output; - TimePath* _risingPath; - TimePath* _fallingPath; - public: - IOPath(const char* input, const char* output): - _input(input), _output(output), - _risingPath(NULL), _fallingPath(NULL) - {} - ~IOPath(); - void CreateRisingPath(const int value); - void CreateFallingPath(const int value); - ofstream& Dump(ofstream& out) const; - -}; - -#endif /* __IO_PATH_H */ diff --git a/alliance/src/a2sdf/src/Makefile.am b/alliance/src/a2sdf/src/Makefile.am deleted file mode 100644 index ac8c9609..00000000 --- a/alliance/src/a2sdf/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -## Process this file with automake to produce Makefile.in - -AM_CXXFLAGS = @ALLIANCE_CFLAGS@ @POPT_CFLAGS@ - -bin_PROGRAMS = a2sdf - -a2sdf_SOURCES = IOPath.cpp IOPath.h \ - TimingCell.cpp TimingCell.h \ - A2Sdf.cpp A2Sdf.h \ - a2sdf.cpp - -a2sdf_LDADD = @ALLIANCE_LIBS@ @POPT_LIBS@ \ - -lAbv -lAbe -lAbt -lMlu \ - -lMcl -lMal -lMsl -lMhl \ - -lMel -lMvl -lMgl -lRcn \ - -lMlo -lBdd -lAbl -lAut -lMut diff --git a/alliance/src/a2sdf/src/TimingCell.cpp b/alliance/src/a2sdf/src/TimingCell.cpp deleted file mode 100644 index cc3e9746..00000000 --- a/alliance/src/a2sdf/src/TimingCell.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "TimingCell.h" - -TimingCell::~TimingCell() -{ - for (IOPaths::iterator it = _ioPaths.begin(); - it != _ioPaths.end(); - it++) - delete it->second; -} - -IOPath* -TimingCell::AddIOPath(const char* input, const char* output) -{ - IOPathKey key(input, output); - IOPaths::iterator ioPathIt; - if ((ioPathIt = _ioPaths.find(key)) != _ioPaths.end()) - return ioPathIt->second; - IOPath* ioPath = new IOPath(input, output); - _ioPaths[key] = ioPath; - return ioPath; -} - -ofstream& -TimingCell::Dump(ofstream& out) -{ - if (_ioPaths.empty()) - return out; - out << " (CELL" << endl - << " (CELLTYPE \"" << _cellName << "\")" << endl - << " (DELAY" << endl - << " (ABSOLUTE" << endl; - for (IOPaths::iterator it = _ioPaths.begin(); - it != _ioPaths.end(); - it++) - { - it->second->Dump(out); - } - out << " )" << endl - << " )" << endl - << " )" << endl; - return out; -} diff --git a/alliance/src/a2sdf/src/TimingCell.h b/alliance/src/a2sdf/src/TimingCell.h deleted file mode 100644 index 64f9859a..00000000 --- a/alliance/src/a2sdf/src/TimingCell.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __TIMING_CELL_H -#define __TIMING_CELL_H - -#include -#include -#include -#include -#include "IOPath.h" -using namespace std; - -struct CompIoPaths -{ - bool operator()(const pair p1, - const pair p2) const - { - return (((int)(p1.first) < (int)(p2.first)) - || ((int)(p1.second) < (int)(p2.second))); - } -}; - -class TimingCell -{ - public: - typedef pair IOPathKey; - typedef map IOPaths; - private: - string _cellName; - IOPaths _ioPaths; - public: - TimingCell(const char* name): - _cellName(name), _ioPaths() - {} - ~TimingCell(); - IOPath* AddIOPath(const char* input, const char* output); - ofstream& Dump(ofstream& out); -}; - -#endif /* __TIMING_CELL_H */ diff --git a/alliance/src/a2sdf/src/a2sdf.cpp b/alliance/src/a2sdf/src/a2sdf.cpp deleted file mode 100644 index 4b574135..00000000 --- a/alliance/src/a2sdf/src/a2sdf.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include "mut.h" -#include "A2Sdf.h" -using namespace std; - -#define EXTENSION ".vbe" - -static void version(void) -{ - cout << "a2sdf(" PACKAGE ") " VERSION << endl; - cout << "ALLIANCE " << ALLIANCE_VERSION << endl; -} - -int -main(int argc, char** argv) -{ - int showUsage = 0; - int showVersion = 0; - int verbose = 0; - const char* cellsDir = NULL; - const char* sdfFileName = NULL; - poptOption options[] = { - { "help", 'h', POPT_ARG_NONE, &showUsage, 0, "print this message", 0}, - { "version", 'v', POPT_ARG_NONE, &showVersion, 0, "print the version information", 0}, - { "Verbose", 'V', POPT_ARG_NONE, &verbose, 0, "verbose mode", 0}, - { 0, 0, 0, 0, 0, 0, 0 } - }; - - poptContext context = poptGetContext("a2sdf", argc, (const char**)argv, options, 0); - poptSetOtherOptionHelp(context, " -hvV "); - - if (int rc = poptGetNextOpt(context) < -1) - { - cerr << "a2sdf: bad argument " << poptBadOption(context, POPT_BADOPTION_NOALIAS) << ": " << poptStrerror(rc) << endl; - cerr << "Try `" << argv[0] << " --help' for more information" << endl; - return 1; - } - - if (showVersion) - { - version(); - return 0; - } - - if (showUsage) - { - version(); - cout << endl; - poptPrintHelp(context, stdout, 0); - return 0; - } - - if ((cellsDir = poptGetArg(context)) == 0 || poptPeekArg(context) == 0) - { - poptPrintUsage(context, stderr, 0); - return 1; - } - - if ((sdfFileName = poptGetArg(context)) == 0 || poptPeekArg(context) != 0) - { - poptPrintUsage(context, stderr, 0); - return 1; - } - - poptFreeContext(context); - - alliancebanner ("A2Sdf", VERSION, "Alliance to SDF format translator", "2002", ALLIANCE_VERSION); - - - DIR* dir = opendir (cellsDir); - if (!dir) - { - cerr << "No directory " << cellsDir << endl; - return 1; - } - - A2Sdf a2sdf(sdfFileName, verbose); - - int extensionlength = strlen(EXTENSION); - - struct dirent* entry = NULL; - - bool cellFound = false; - - while ((entry = readdir (dir)) != NULL) - { - char* filename = entry->d_name; - int filenamelength = strlen (filename); - - if (filenamelength <= extensionlength) continue; - /* is extension of filename accepted */ - if (strncmp (filename + filenamelength - extensionlength, - EXTENSION, extensionlength)) continue; - cellFound = true; - string cellName(filename); - cellName.erase( cellName.find(EXTENSION)); - a2sdf.CreateTimingCell(cellName.c_str()); - } - - if (cellFound) - a2sdf.Dump(); - else - { - cerr << " o Error: No cell to convert in: " - << cellsDir << endl; - return 1; - } - - - return 0; -}