This commit is contained in:
parent
542b1e4355
commit
78eb5dcdb5
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src man1
|
|
@ -0,0 +1,2 @@
|
|||
man_MANS = k2f.1
|
||||
EXTRA_DIST = $(man_MANS)
|
|
@ -0,0 +1,28 @@
|
|||
.TH PAT2DWL 1 "October 1, 1997" "ASIM/LIP6" "CAO\-VLSI Reference Manual"
|
||||
.SH NAME
|
||||
.PP
|
||||
\fIk2f\fP, FSM translator ALLIANCE format from/to Berkeley format
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
\fBk2f\fP
|
||||
.I In_format
|
||||
.I Out_format
|
||||
.I Input_name
|
||||
[
|
||||
.I Output_name
|
||||
]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBk2f\fP is a FSM translator from ALLIANCE format (\fI".fsm"\fP)
|
||||
to Berkeley format (\fI".kiss2"\fP).
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
fsm(5)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = k2f
|
||||
|
||||
k2f_LDADD = @LIBS@ \
|
||||
-lFtl -lFks -lFvh -lFsm \
|
||||
-lBdd -lAbl -lAut -lMut
|
||||
|
||||
|
||||
k2f_SOURCES = \
|
||||
k2f_error.c k2f_error.h k2f_main.c k2f_main.h
|
|
@ -0,0 +1,128 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU General Public |
|
||||
| License as published by the Free Software Foundation; |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : K2F |
|
||||
| |
|
||||
| File : k2f_error.c |
|
||||
| |
|
||||
| Authors : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 04.12.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include MUT_H
|
||||
# include AUT_H
|
||||
# include "k2f_error.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Private variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| K2fDisplayError |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void K2fDisplayError( File, Line, Error, Text )
|
||||
|
||||
char *File;
|
||||
int Line;
|
||||
int Error;
|
||||
char *Text;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%d ", Name, Line );
|
||||
|
||||
switch( Error )
|
||||
{
|
||||
default : fprintf( stderr, "Internal error number %d\n", Error );
|
||||
}
|
||||
|
||||
autexit( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| K2fDisplayWarning |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void K2fDisplayWarning( File, Line, Warning, Text )
|
||||
|
||||
char *File;
|
||||
int Line;
|
||||
int Warning;
|
||||
char *Text;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%d ", Name, Line );
|
||||
|
||||
switch ( Warning )
|
||||
{
|
||||
default : fprintf( stderr, "Internal warning number %d\n", Warning );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU General Public |
|
||||
| License as published by the Free Software Foundation; |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : K2F |
|
||||
| |
|
||||
| File : k2f_error.h |
|
||||
| |
|
||||
| Authors : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 04.12.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef K2F_ERROR_H
|
||||
# define K2F_ERROR_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Errors |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Warnings |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define K2fError( ERROR, TEXT ) \
|
||||
\
|
||||
K2fDisplayError( __FILE__, __LINE__, (ERROR), (TEXT) )
|
||||
|
||||
# define K2fWarning( WARNING, TEXT ) \
|
||||
\
|
||||
K2fDisplayWarning( __FILE__, __LINE__, (WARNING), (TEXT) )
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
extern void K2fDisplayError();
|
||||
extern void K2fDisplayWarning();
|
||||
|
||||
# endif
|
|
@ -0,0 +1,161 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU General Public |
|
||||
| License as published by the Free Software Foundation; |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : K2F |
|
||||
| |
|
||||
| File : k2f_main.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 04.12.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include MUT_H
|
||||
# include AUT_H
|
||||
# include ABL_H
|
||||
# include BDD_H
|
||||
# include FSM_H
|
||||
# include FTL_H
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include "k2f_error.h"
|
||||
# include "k2f_main.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
fsmfig_list *K2fFsmFigure = (fsmfig_list *)0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| K2f Usage |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void K2fUsage()
|
||||
{
|
||||
fprintf( stderr, "\t\tk2f In_format Out_format Input_name [Output_name]\n\n" );
|
||||
fprintf( stdout, "\n" );
|
||||
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Main |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int main( argc, argv )
|
||||
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
char *InputFileName;
|
||||
char *OutputFileName;
|
||||
char *InputFormat;
|
||||
char *OutputFormat;
|
||||
int Number;
|
||||
|
||||
alliancebanner_with_authors( "K2F", K2F_VERSION,
|
||||
"Translator Kiss <-> FSM Format", "1996", ALLIANCE_VERSION,
|
||||
"Ludovic Jacomme" );
|
||||
|
||||
mbkenv();
|
||||
autenv();
|
||||
ablenv();
|
||||
bddenv();
|
||||
fsmenv();
|
||||
|
||||
if ( argc < 4 ) K2fUsage();
|
||||
|
||||
InputFileName = (char *)0;
|
||||
OutputFileName = (char *)0;
|
||||
InputFormat = (char *)0;
|
||||
OutputFormat = (char *)0;
|
||||
|
||||
for ( Number = 1; Number < argc; Number++ )
|
||||
{
|
||||
if ( InputFormat == (char *)0 ) InputFormat = argv[ Number ];
|
||||
else
|
||||
if ( OutputFormat == (char *)0 ) OutputFormat = argv[ Number ];
|
||||
else
|
||||
if ( InputFileName == (char *)0 ) InputFileName = argv[ Number ];
|
||||
else
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = argv[ Number ];
|
||||
else
|
||||
K2fUsage();
|
||||
}
|
||||
|
||||
if ( ( InputFileName == (char *)0 ) ||
|
||||
( InputFormat == (char *)0 ) ||
|
||||
( OutputFormat == (char *)0 ) ) K2fUsage();
|
||||
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = InputFileName;
|
||||
|
||||
FSM_IN = namealloc( InputFormat );
|
||||
FSM_OUT = namealloc( OutputFormat );
|
||||
|
||||
fprintf( stdout, "\n\n\t--> Translate figure %s\n", InputFileName );
|
||||
|
||||
K2fFsmFigure = getfsmfig( InputFileName );
|
||||
|
||||
K2fFsmFigure->NAME = namealloc( OutputFileName );
|
||||
savefsmfig( K2fFsmFigure );
|
||||
|
||||
fprintf( stdout, "\t<-- done\n\n" );
|
||||
|
||||
return( 0 );
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU General Public |
|
||||
| License as published by the Free Software Foundation; |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : K2F |
|
||||
| |
|
||||
| File : k2f_main.h |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 04.12.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef K2F_MAIN_H
|
||||
# define K2F_MAIN_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
Loading…
Reference in New Issue