SIS provides a logic synthesis library
libsis.a that is required for Petrify. The following instructions are for SIS 1.3 Unofficial Distribution.
restrict is keyword now, therefore replace
restrict_var in all the source files.
Build SIS for Linux as follows:
./configure CFLAGS=-m32 make
./configure CFLAGS=-m64 make
Cygwin build is smooth, but it introduces ugly dependency on
cygwin1.dll for compatibility layer. On the other hand MinGW provides a convenient toolchain for cross-compilation and does not introduce unnecessary dependencies, therefore MinGW will be used to cross-compile for Windows.
sudo apt install mingw-w64
__MINGW32__macro to distinguish Windows builds.
-lwinmmto the linker command:
ifneq ($(findstring mingw32, $(CC)),) sis_LDADD = libsis.a -lm -lwinmm else sis_LDADD = libsis.a -lm endif
libsis.alibrary for linking with Petrify without compatibility layer of Cygwin or MSYS2. The following changes and sacrifices had to be made for Windows build:
mallocinstead of default
gethostnamefunction could not be found even when linked with
CloseHandlefunction which however cannot be found at linking. It is commented out which may lead to resource leaks.
SIGALRMis based on
timeSetEventfunction that requires
./configure --host=i686-w64-mingw32 make
./configure --host=x86_64-w64-mingw32 make
sudo port install gcc8 +universal #sudo port select --list gcc sudo port select --set gcc mp-gcc8 sudo port install bison sudo port install dos2unix
CFLAGS=-m32 CPPFLAGS=-m32 ./configure
makeat this point will throw several errors. To fix these do the following (remember to save changes after editing):
sis/espresso/unate.creplace all uses of the variable name
restrictwith something else, as restrict is a protected word in C++. We suggest replacing with
sis/command/filec.c, change line 15
sis/io/read_kiss.c, edit line 13, changing
read_error(char *, …).
sis/minimize/minimize.creplace all variables named
sis/pld/act_bdd.c, move line 151
static int compare();to outside of this function, such as to line 144.
static int compare();to outside of this function, such as to line 124.
sis/pld/xln_merge.c, move line 299
static sm_row *xln_merge_find_neighbor_of_row1_with_minimum_neighbors();outside of this function, to line 287, for example.
sis/pld/xln_pert_dec.c, move line 58,
static int kernel_value();outside of this function, for example to line 50.
makewill now correctly build sis, and produce a file
sis/libsis.aneeded for petrify.