Skip to content

Commit 3a2f754

Browse files
committed
Iniziata odissea per la compilazione
1 parent b1815f8 commit 3a2f754

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+142
-415
lines changed

CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
cmake_minimum_required(VERSION 3.5)
22
project(sis)
33

4-
set(CMAKE_C_STANDARD 90)
5-
64
include_directories(sis/include)
75

86
add_subdirectory(blif2vst)

TODO.md

100644100755
File mode changed.

sis/include/astg_core.h sis/astg/astg_core.h

+2
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ static void io_unget(int, io_t *);
355355

356356
int io_get(io_t *);
357357

358+
int io_token(io_t *source);
359+
358360
static int io_getc(io_t *);
359361

360362
int io_error(io_t *, char *);

sis/astg/astg_core1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#ifdef SIS
77

8-
#include <astg_int.h>
8+
#include "astg_int.h"
99

1010
#include "astg_core.h"
1111
#include "astg_int.h"

sis/include/astg_int.h sis/astg/astg_int.h

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ typedef void (*astg_daemon)(astg_graph *, astg_graph *);
113113
#define args args
114114
#endif
115115

116+
int astg_write(astg_graph *stg, astg_bool hide_places, FILE *stream);
117+
116118
astg_vertex_enum astg_v_type(astg_vertex *);
117119

118120
char *astg_v_name(astg_vertex *);
File renamed without changes.

sis/astg/bwd_lp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "bwd_int.h"
99
#include "sis.h"
1010
#include <math.h>
11-
#include <retime_int.h>
11+
#include "../retime/retime_int.h"
1212

1313
/* hacked from sim/interpret.c */
1414
#define SIM_SLOT simulation
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sis/include/bdduser.h sis/bdd_cmu/bdd_cmu/bdduser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef BDDUSER_H
44
#define BDDUSER_H
55

6-
#include <memuser.h>
6+
#include "../mem/memuser.h"
77
#include <stdio.h>
88

99
#if defined(__STDC__)

sis/bdd_cmu/bdd_port/bdditer.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#include "util.h" /* includes math.h */
55

66
#include "bdd.h" /* UCB interface to CMU */
7-
#include "bddint.h" /* CMU internal routines; for use in bdd_get_branches() and for BDD_POINTER */
8-
#include "bdduser.h" /* CMU exported routines */
7+
#include "../bdd_cmu/bddint.h" /* CMU internal routines; for use in bdd_get_branches() and for BDD_POINTER */
8+
#include "../bdd_cmu/bdduser.h" /* CMU exported routines */
99

1010
static void pop_cube_stack();
1111

sis/bdd_cmu/bdd_port/bddport.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#include "util.h" /* includes math.h */
1616

1717
#include "bdd.h" /* UCB interface to CMU */
18-
#include "bddint.h" /* CMU internal routines; for use in bdd_get_node() */
19-
#include "bdduser.h" /* CMU exported routines */
20-
#include "memuser.h"
18+
#include "../bdd_cmu/bddint.h" /* CMU internal routines; for use in bdd_get_node() */
19+
#include "../bdd_cmu/bdduser.h" /* CMU exported routines */
20+
#include "../mem/memuser.h"
2121

2222
/*
2323
* Function to construct a bdd_t.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sis/delay/delay.c

-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{
2-
31
/*
42
* The purpose of this package is the computation of node and network delays
53
* in SIS. Delays are returned as delay_time_t structures, which contain two
@@ -12,10 +10,6 @@
1210
*/
1311
#include "delay_int.h"
1412

15-
void
16-
17-
void
18-
1913
#include "tdc_int.h"
2014
#include "sis.h"
2115
#include <setjmp.h>
File renamed without changes.
File renamed without changes.
File renamed without changes.

sis/espresso/set.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ bool setp_full(register pset a, register int size) {
179179
}
180180

181181
/* setp_equal -- check if the set "a" equals set "b" */
182-
bool setp_equal(register pset a, register pset b);
183-
182+
bool setp_equal(register pset a, register pset b)
184183
{
185184
register int i = LOOP(a);
186185
do
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sis/genlib/aoi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int gl_gen_complex_gates(int level, int s, int p, tree_node_type_t root_type, tr
117117
return nforms;
118118
}
119119

120-
int gl_generate_complex_gates(int level, s, p, tree_node_t ***forms) {
120+
int gl_generate_complex_gates(int level, int s, int p, tree_node_t ***forms) {
121121
int num1, num2, i;
122122
tree_node_t **forms1, **forms2;
123123

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sis/include/array.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,29 @@ typedef struct array_t {
2626
int index; // combined index and locking flag.
2727
} array_t;
2828

29-
extern array_t *array_do_alloc(int size, int number);
29+
array_t *array_do_alloc(int size, int number);
3030

3131
/**
3232
* Create a duplicate copy of an array.
3333
*/
34-
extern array_t *array_dup(array_t *);
34+
array_t *array_dup(array_t *old);
3535

3636
/**
3737
* Returns a new array which consists of the elements from array1
3838
* followed by the elements of array2.
3939
*/
40-
extern array_t *array_join(array_t *, array_t *);
40+
array_t *array_join(array_t *array1, array_t *array2);
4141

4242
/**
4343
* Deallocate an array. Freeing the individual elements of the
4444
* array is the responsibility of the user.
4545
*/
46-
extern void array_free(array_t *);
46+
void array_free(array_t *array);
4747

4848
/**
4949
* Appends the elements of array2 to the end of array1.
5050
*/
51-
extern void array_append(array_t *, array_t *);
51+
void array_append(array_t *array1, array_t *array2);
5252

5353
/**
5454
* Sort the elements of an array. `compare' is defined as:
@@ -60,7 +60,7 @@ extern void array_append(array_t *, array_t *);
6060
* and should return -1 if obj1 < obj2, 0 if obj1 == obj2, or 1
6161
* if obj1 > obj2.
6262
*/
63-
extern void array_sort(array_t *, int (*)());
63+
void array_sort(array_t *array, int (*compare)());
6464

6565
/**
6666
* Compare adjacent elements of the array, and delete any duplicates.
@@ -82,13 +82,13 @@ extern void array_sort(array_t *, int (*)());
8282
*
8383
* and frees the given array element.
8484
*/
85-
extern void array_uniq(array_t *, int (*)(), void (*)());
85+
void array_uniq(array_t *array, int (*compare)(), void (*free_func)());
8686

87-
extern int array_abort(array_t *, int);
87+
int array_abort(array_t *a, int i);
8888

89-
extern int array_resize(array_t *, int);
89+
int array_resize(array_t *array, int new_size);
9090

91-
extern char *array_do_data(array_t *);
91+
char *array_do_data(array_t *array);
9292

9393
extern unsigned int array_global_index;
9494

sis/include/bdd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "var_set.h"
2020
#include "array.h"
2121
#include "st.h"
22-
#include "bdduser.h"
22+
#include "../bdd_cmu/bdd_cmu/bdduser.h"
2323

2424
#ifndef TRUE
2525
#define TRUE 1

sis/include/enc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define LIMIT 5000
66

77
#include "sparse.h"
8-
#include "astg_int.h"
8+
#include "../astg/astg_int.h"
99

1010
/* each dichotomy is a contatenation of two sets - one for the lhs and
1111
* one for the rhs */

sis/include/latch.h

+18-20
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,24 @@
66
#ifdef COMBINATIONAL
77
#undef COMBINATIONAL
88
#endif
9-
typedef enum {
10-
ACTIVE_HIGH,
11-
ACTIVE_LOW,
12-
RISING_EDGE,
13-
FALLING_EDGE,
14-
COMBINATIONAL,
15-
ASYNCH,
16-
UNKNOWN
17-
} latch_synch_t;
18-
19-
typedef struct {
20-
node_t *latch_input; /* must be a PRIMARY_OUTPUT */
21-
node_t *latch_output; /* must be a PRIMARY_INPUT */
22-
int initial_value; /* initial or reset state */
23-
int current_value; /* current state */
24-
latch_synch_t synch_type; /* type of latch */
25-
struct lib_gate_struct *gate; /* Reference to the library implementation */
26-
node_t *control; /* Pointer to the controlling gate */
27-
char *undef1; /* undefined 1, for the programer's use */
28-
} latch_t;
9+
10+
typedef enum latch_synch_enum latch_synch_t;
11+
enum latch_synch_enum {
12+
ACTIVE_HIGH, ACTIVE_LOW, RISING_EDGE, FALLING_EDGE, COMBINATIONAL,
13+
ASYNCH, UNKNOWN
14+
};
15+
16+
typedef struct latch_struct latch_t;
17+
struct latch_struct {
18+
node_t *latch_input; /* must be a PRIMARY_OUTPUT */
19+
node_t *latch_output; /* must be a PRIMARY_INPUT */
20+
int initial_value; /* initial or reset state */
21+
int current_value; /* current state */
22+
latch_synch_t synch_type; /* type of latch */
23+
struct lib_gate_struct *gate; /* Reference to the library implementation */
24+
node_t *control; /* Pointer to the controlling gate */
25+
char *undef1; /* undefined 1, for the programer's use */
26+
};
2927

3028
extern latch_t *latch_alloc(void);
3129

sis/include/library.h

+1-16
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ struct lib_class_struct {
2828
char *name; /* reserved for future use */
2929
};
3030

31-
#ifdef SIS
3231
/* sequential support */
3332
typedef struct latch_time_struct latch_time_t;
3433
struct latch_time_struct {
3534
double setup;
3635
double hold;
3736
};
38-
#endif
3937

4038
typedef struct lib_gate_struct lib_gate_t;
4139
struct lib_gate_struct {
@@ -46,14 +44,12 @@ struct lib_gate_struct {
4644
int symmetric; /* it is more or less symmetric WRT input pins */
4745
lib_class_t *class_p; /* pointer back to the class */
4846

49-
#ifdef SIS
5047
/* sequential support */
5148
int type; /* type of gate -- lib_gate_type returns latch_synch_t */
5249
int latch_pin; /* index for the latch output pin (-1 if none) */
5350
latch_time_t **latch_time_info; /* setup/hold times */
5451
delay_pin_t *clock_delay; /* delay from clock to output */
5552
char *control_name; /* name of the clock pin */
56-
#endif
5753
};
5854

5955
/* normal library functions */
@@ -85,7 +81,6 @@ extern int lib_gate_num_in(lib_gate_t *);
8581

8682
extern int lib_gate_num_out(lib_gate_t *);
8783

88-
#ifdef SIS
8984
/* sequential support */
9085
#define lib_gate_type(g) \
9186
(((g) == NIL(lib_gate_t)) ? UNKNOWN : (latch_synch_t)(g)->type)
@@ -95,21 +90,11 @@ extern int lib_gate_num_out(lib_gate_t *);
9590
#define lib_gate_clock_delay(g) \
9691
(((g) == NIL(lib_gate_t)) ? NIL(delay_pin_t) : (g)->clock_delay)
9792

98-
extern lib_gate_t *lib_choose_smallest_latch(library_t *library, char *string, latch_synch_t latch_type)
99-
100-
#endif
101-
102-
#ifdef SIS
93+
extern lib_gate_t *lib_choose_smallest_latch(library_t *library, char *string, latch_synch_t latch_type);
10394

10495
extern lib_class_t *lib_get_class_by_type(network_t *, library_t *,
10596
latch_synch_t);
10697

107-
#else
108-
109-
extern lib_class_t *lib_get_class_by_type(network_t *, library_t *);
110-
111-
#endif
112-
11398
/* for mapped nodes/networks */
11499
extern lib_gate_t *lib_gate_of(node_t *);
115100

0 commit comments

Comments
 (0)