10 extern void avtenv(void);
11 extern void savebefig(befig_list
*ptbefig
, unsigned int trace_mode
);
18 verilogloadlofig(NULL
,"testeat",'A');
25 beg_def_befig ("addaccu");
27 beg_def_por ("a(0:3)" ,'I');
28 beg_def_por ("b(0:3)" ,'I');
29 beg_def_por ("sel" ,'I');
30 beg_def_por ("ck" ,'I');
31 beg_def_por ("s(0:3)" ,'O');
32 beg_def_por ("vdd" ,'I');
33 beg_def_por ("vdde" ,'I');
34 beg_def_por ("vss" ,'I');
35 beg_def_por ("vsse" ,'I');
37 beg_assertion ("vdd and not vss" ,"Wrong power supplies" ,
39 beg_assertion ("vdde and not vsse" ,"Wrong power external supplies",
42 beg_def_mux ("outmux(0:3)" ,"sel" ,"0b 0" ,"a(0:3)" ,0);
43 beg_def_mux ("outmux(0:3)" ,"sel" ,"0b 1" ,"outreg(0:3)" ,0);
45 beg_def_sig ("sum(0)" ,"outmux(0) xor b(0)" ,0);
46 beg_def_sig ("carry(0)" ,"outmux(0) and b(0)" ,0);
47 beg_def_sig ("sum(1)" ,"outmux(1) xor b(1) xor carry(0)" ,0);
48 beg_def_sig ("carry(1)" ,"(outmux(1) and b(1)) or (outmux(1) "
49 "and carry(0)) or (b(1) and carry(0))" ,0);
50 beg_def_sig ("sum(2)" ,"outmux(2) xor b(2) xor carry(1)" ,0);
51 beg_def_sig ("carry(2)" ,"(outmux(2) and b(2)) or (outmux(2) "
52 "and carry(1)) or (b(2) and carry(1))" ,0);
53 beg_def_sig ("sum(3)" ,"outmux(3) xor b(3) xor carry(2)" ,0);
54 beg_def_sig ("s(0:3)" ,"sum(0:3)" ,0);
56 beg_def_process("reg(0:3)" ,"not ck and ck'event" ,"not sum(0:3)" ,0,
59 beg_def_sig ("outreg(0:3)" ,"not reg(0:3)" ,0);
61 befig
= beg_get_befig(0);
69 beg_def_befig ("amd");
70 //beg_def_por ("cke" ,'I');
71 //beg_def_por ("fonc" ,'I');
72 //beg_def_por ("test" ,'I');
73 //beg_def_por ("scin" ,'I');
74 beg_def_por ("scout" ,'O');
75 //beg_def_por ("i(8:0)" ,'I');
76 //beg_def_por ("a(3:0)" ,'I');
77 //beg_def_por ("b(3:0)" ,'I');
78 //beg_def_por ("d(3:0)" ,'I');
79 //beg_def_por ("noe" ,'I');
80 beg_def_por ("r0" ,'O');
81 beg_def_por ("r3" ,'O');
82 beg_def_por ("q0" ,'O');
83 beg_def_por ("q3" ,'O');
84 beg_def_por ("ovr" ,'O');
85 beg_def_por ("zero" ,'O');
86 beg_def_por ("signe" ,'O');
87 beg_def_por ("np" ,'O');
88 beg_def_por ("ng" ,'O');
89 //beg_def_por ("cin" ,'I');
90 beg_def_por ("cout" ,'O');
91 beg_def_por ("y(3:0)" ,'O');
92 beg_def_por ("vddi" ,'I');
93 beg_def_por ("vssi" ,'I');
94 beg_def_por ("vdde" ,'I');
95 beg_def_por ("vsse" ,'I');
97 beg_assertion ("vddi and not vssi" ,"Wrong power supplies",'W',NULL
);
98 beg_assertion ("vdde and not vsse" ,"Wrong power external supplies",'W',NULL
);
100 beg_def_mux ("s(3:0)" ,"i(2:0)" ,"0o4" ,"ra(3:0)" ,0);
101 beg_def_mux ("s(3:0)" ,0 ,"0o5" ,"ra(3:0)" ,0);
102 beg_def_mux ("s(3:0)" ,0 ,"0o1" ,"rb(3:0)" ,0);
103 beg_def_mux ("s(3:0)" ,0 ,"0o3" ,"rb(3:0)" ,0);
104 beg_def_mux ("s(3:0)" ,0 ,"0o0" ,"not accu(3:0)",0);
105 beg_def_mux ("s(3:0)" ,0 ,"0o2" ,"not accu(3:0)",0);
106 beg_def_mux ("s(3:0)" ,0 ,"0o6" ,"not accu(3:0)",0);
107 beg_def_mux ("s(3:0)" ,0 ,"0o7" ,"0x 0" ,0);
109 beg_def_mux ("r(3:0)" ,"i(2:0)" ,"0o0" ,"ra(3:0)" ,0);
110 beg_def_mux ("r(3:0)" ,0 ,"0o1" ,"ra(3:0)" ,0);
111 beg_def_mux ("r(3:0)" ,0 ,"0o2" ,"0x 0" ,0);
112 beg_def_mux ("r(3:0)" ,0 ,"0o3" ,"0x 0" ,0);
113 beg_def_mux ("r(3:0)" ,0 ,"0o4" ,"0x 0" ,0);
114 beg_def_mux ("r(3:0)" ,0 ,"0o5" ,"d(3:0)" ,0);
115 beg_def_mux ("r(3:0)" ,0 ,"0o6" ,"d(3:0)" ,0);
116 beg_def_mux ("r(3:0)" ,0 ,"0o7" ,"d(3:0)" ,0);
118 beg_def_process("y(3:0)" ,"not noe and i(8:6)=0o2" ,"ra(3:0)" ,0,BEG_PRE
|BEG_REG
);
119 beg_def_process("y(3:0)" ,"not noe" ,"alu_out(3:0)" ,0,BEG_PRE
|BEG_REG
);
120 beg_def_process("y(3:0)" ,"0b1" ,"0xZ" ,0,BEG_PRE
|BEG_REG
);
123 beg_def_sig ("sumrs(3:0)" ,"r(3:0) xor s(3:0) xor (c_sumrs(2:0)&cin)" ,0);
124 beg_def_sig ("c_sumrs(3:0)" ,"( r(3:0) and s(3:0) ) or ( r(3:0) and (c_sumrs(2:0)&cin) ) or ( s(3:0) and (c_sumrs(2:0)&cin) )" ,0);
126 beg_def_sig ("difrs(3:0)" ,"r(3:0) xor not s(3:0) xor (c_difrs(2:0)&cin)" ,0);
127 beg_def_sig ("c_difrs(3:0)" ,"( r(3:0) and not s(3:0) ) or ( r(3:0) and (c_difrs(2:0)&cin) ) or ( not s(3:0) and (c_difrs(2:0)&cin) )" ,0);
129 beg_def_sig ("difsr(3:0)" ,"not r(3:0) xor s(3:0) xor (c_difsr(2:0)&cin)" ,0);
130 beg_def_sig ("c_difsr(3:0)" ,"( not r(3:0) and s(3:0) ) or ( not r(3:0) and (c_difsr(2:0)&cin) ) or ( s(3:0) and (c_difsr(2:0)&cin) )" ,0);
132 beg_def_mux ("ng" ,"i(5:3)" ,"0o0" ,"not ((r(3) and s(3)) or ((r(3) or s(3)) and (r(2) and s(2))) or ((r(3) or s(3)) and (r(2) or s(2)) and (r(1) and s(1))) or ((r(3) or s(3)) and (r(2) or s(2)) and (r(1) or s(1)) and (r(0) and s(0))))" ,0);
133 beg_def_mux ("ng" ,0 ,"0o1" ,"NOT ((NOT r(3) AND s(3)) OR ((NOT r(3) OR s(3)) AND (NOT r(2) AND s(2))) OR ((NOT r(3) OR s(3)) AND (NOT r(2) OR s(2)) AND (NOT r(1) AND s(1))) OR ((NOT r(3) OR s(3)) AND (NOT r(2) OR s(2)) AND (NOT r(1) OR s(1)) AND (NOT r(0) AND s(0))))" ,0);
134 beg_def_mux ("ng" ,0 ,"0o2" ,"NOT ((r(3) AND NOT s(3)) OR ((r(3) OR NOT s(3)) AND (r(2) AND NOT s(2))) OR ((r(3) OR NOT s(3)) AND (r(2) OR NOT s(2)) AND (r(1) AND NOT s(1))) OR ((r(3) OR NOT s(3)) AND (r(2) OR NOT s(2)) AND (r(1) OR NOT s(1)) AND (r(0) AND NOT s(0))))" ,0);
136 beg_def_mux ("np" ,"i(5:3)" ,"0o0" ,"NOT ((r(3) OR s(3)) AND (r(2) OR s(2)) AND (r(1) OR s(1)) AND (r(0) OR s(0)))" ,0);
137 beg_def_mux ("np" ,0 ,"0o1" ,"NOT ((NOT r(3) OR s(3)) AND (NOT r(2) OR s(2)) AND (NOT r(1) OR s(1)) AND (NOT r(0) OR s(0)))" ,0);
138 beg_def_mux ("np" ,0 ,"0o2" ,"NOT ((r(3) OR NOT s(3)) AND (r(2) OR NOT s(2)) AND (r(1) OR NOT s(1)) AND (r(0) OR NOT s(0)))" ,0);
140 beg_def_sig ("signe" ,"alu_out(3)" ,0);
141 beg_def_sig ("zero" ,"NOT (alu_out(3) OR alu_out(2) OR alu_out(1) OR alu_out(0))" ,0);
143 beg_def_mux ("ovr" ,"i(5:3)" ,"0o0" ,"c_sumrs(3) xor c_sumrs(2)" ,0);
144 beg_def_mux ("ovr" ,0 ,"0o1" ,"c_difsr(3) xor c_difsr(2)" ,0);
145 beg_def_mux ("ovr" ,0 ,"0o2" ,"c_difrs(3) xor c_difrs(2)" ,0);
146 beg_def_mux ("ovr" ,0 ,"default","0b 0" ,0);
148 beg_def_mux ("alu_out(3:0)" ,"i(5:3)" ,"0o0" ,"sumrs(3:0)" ,0);
149 beg_def_mux ("alu_out(3:0)" ,0 ,"0o1" ,"difsr(3:0)" ,0);
150 beg_def_mux ("alu_out(3:0)" ,0 ,"0o2" ,"difrs(3:0)" ,0);
151 beg_def_mux ("alu_out(3:0)" ,0 ,"0o3" ,"r(3:0) or s(3:0)" ,0);
152 beg_def_mux ("alu_out(3:0)" ,0 ,"0o4" ,"r(3:0) and s(3:0)" ,0);
153 beg_def_mux ("alu_out(3:0)" ,0 ,"0o5" ,"not r(3:0) and s(3:0)" ,0);
154 beg_def_mux ("alu_out(3:0)" ,0 ,"0o6" ,"r(3:0) xor s(3:0)" ,0);
155 beg_def_mux ("alu_out(3:0)" ,0 ,"0o7" ,"not (r(3:0) xor s(3:0))" ,0);
157 beg_def_mux ("cout" ,"i(5:3)" ,"0o0" ,"c_sumrs(3)" ,0);
158 beg_def_mux ("cout" ,0 ,"0o1" ,"c_difsr(3)" ,0);
159 beg_def_mux ("cout" ,0 ,"0o2" ,"c_difrs(3)" ,0);
160 beg_def_mux ("cout" ,0 ,"default","0b 0" ,0);
162 beg_def_sig ("wram" ,"(i(8) OR i(7)) AND fonc_mode" ,0);
163 beg_def_sig ("waccu" ,"NOT (i(6)) AND ((NOT i(7)) OR i(8))" ,0);
164 beg_def_sig ("fonc_mode" ,"fonc AND (NOT test)" ,0);
165 beg_def_sig ("test_mode" ,"test AND (NOT fonc)" ,0);
166 beg_def_sig ("shift_r" ,"i(8) AND (NOT i(7))" ,0);
167 beg_def_sig ("shift_l" ,"i(8) AND i(7)" ,0);
168 beg_def_sig ("shift_n" ,"NOT i(8)" ,0);
170 beg_def_mux ("sh_acc(3)" ,"i(8:6)" ,"0o0" ,"alu_out(3)" ,0);
171 beg_def_mux ("sh_acc(3)" ,0 ,"0o6" ,"not accu(2)" ,0);
172 beg_def_mux ("sh_acc(3)" ,0 ,"0o7" ,"not accu(2)" ,0);
173 beg_def_mux ("sh_acc(3)" ,0 ,"0o4" ,"q3" ,0);
174 beg_def_mux ("sh_acc(3)" ,0 ,"0o5" ,"q3" ,0);
175 beg_def_mux ("sh_acc(3)" ,0 ,"default","0b 0" ,0);
177 beg_def_mux ("sh_acc(2)" ,"i(8:6)" ,"0o0" ,"alu_out(2)" ,0);
178 beg_def_mux ("sh_acc(2)" ,0 ,"0o6" ,"not accu(1)" ,0);
179 beg_def_mux ("sh_acc(2)" ,0 ,"0o7" ,"not accu(1)" ,0);
180 beg_def_mux ("sh_acc(2)" ,0 ,"0o4" ,"not accu(3)" ,0);
181 beg_def_mux ("sh_acc(2)" ,0 ,"0o5" ,"not accu(3)" ,0);
182 beg_def_mux ("sh_acc(2)" ,0 ,"default","0b 0" ,0);
184 beg_def_mux ("sh_acc(1)" ,"i(8:6)" ,"0o0" ,"alu_out(1)" ,0);
185 beg_def_mux ("sh_acc(1)" ,0 ,"0o6" ,"not accu(0)" ,0);
186 beg_def_mux ("sh_acc(1)" ,0 ,"0o7" ,"not accu(0)" ,0);
187 beg_def_mux ("sh_acc(1)" ,0 ,"0o4" ,"not accu(2)" ,0);
188 beg_def_mux ("sh_acc(1)" ,0 ,"0o5" ,"not accu(2)" ,0);
189 beg_def_mux ("sh_acc(1)" ,0 ,"default","0b 0" ,0);
191 beg_def_mux ("sh_acc(0)" ,"i(8:6)" ,"0o0" ,"alu_out(0)" ,0);
192 beg_def_mux ("sh_acc(0)" ,0 ,"0o6" ,"q0" ,0);
193 beg_def_mux ("sh_acc(0)" ,0 ,"0o7" ,"q0" ,0);
194 beg_def_mux ("sh_acc(0)" ,0 ,"0o4" ,"not accu(1)" ,0);
195 beg_def_mux ("sh_acc(0)" ,0 ,"0o5" ,"not accu(1)" ,0);
196 beg_def_mux ("sh_acc(0)" ,0 ,"default","0b 0" ,0);
198 beg_def_process("q3" ,"i(8:6)=0o6 or i(8:6)=0o7","not accu(3)",0,BEG_REG
);
199 beg_def_process("q0" ,"i(8:6)=0o4 or i(8:6)=0o5","not accu(0)",0,BEG_REG
);
201 beg_def_sig ("wckaccu" ,"cke AND (test_mode OR (waccu AND fonc_mode))" ,0);
203 beg_def_mux ("accu_in(3:0)" ,"test_mode","0b0","sh_acc(3:0)" ,0);
204 beg_def_mux ("accu_in(3:0)" ,0 ,"0b1","not accu(2:0) & scin",0);
206 beg_def_process("accu(3:0)" ,"not wckaccu and not wckaccu'stable" ,"not accu_in(3:0)",0,BEG_REG
);
208 beg_def_sig ("scout" ,"not accu(3) and test_mode" ,0);
210 beg_def_mux ("sh_ram(3)" ,"shift_n & shift_l & shift_r","0o4","alu_out(3)" ,0);
211 beg_def_mux ("sh_ram(3)" ,0 ,"0o2" ,"alu_out(2)",0);
212 beg_def_mux ("sh_ram(3)" ,0 ,"0o1" ,"r3" ,0);
213 beg_def_mux ("sh_ram(3)" ,0 ,"default","0b0" ,0);
215 beg_def_mux ("sh_ram(2)" ,"shift_n & shift_l & shift_r","0o4","alu_out(2)" ,0);
216 beg_def_mux ("sh_ram(2)" ,0 ,"0o2" ,"alu_out(1)",0);
217 beg_def_mux ("sh_ram(2)" ,0 ,"0o1" ,"alu_out(3)",0);
218 beg_def_mux ("sh_ram(2)" ,0 ,"default","0b0" ,0);
220 beg_def_mux ("sh_ram(1)" ,"shift_n & shift_l & shift_r","0o4","alu_out(1)" ,0);
221 beg_def_mux ("sh_ram(1)" ,0 ,"0o2" ,"alu_out(0)",0);
222 beg_def_mux ("sh_ram(1)" ,0 ,"0o1" ,"alu_out(2)",0);
223 beg_def_mux ("sh_ram(1)" ,0 ,"default","0b0" ,0);
225 beg_def_mux ("sh_ram(0)" ,"shift_n & shift_l & shift_r","0o4","alu_out(0)" ,0);
226 beg_def_mux ("sh_ram(0)" ,0 ,"0o2" ,"r0" ,0);
227 beg_def_mux ("sh_ram(0)" ,0 ,"0o1" ,"alu_out(1)",0);
228 beg_def_mux ("sh_ram(0)" ,0 ,"default","0b0" ,0);
230 beg_def_process("r3" ,"shift_l" ,"not alu_out(3)" ,0,BEG_REG
);
231 beg_def_process("r0" ,"shift_l" ,"not alu_out(0)" ,0,BEG_REG
);
233 beg_def_sig ("wck(0)" ,"cke and wram and not b(3) and not b(2) and not b(1) and not b(0)",0);
234 beg_def_sig ("wck(1)" ,"cke and wram and not b(3) and not b(2) and not b(1) and b(0)",0);
235 beg_def_sig ("wck(2)" ,"cke and wram and not b(3) and not b(2) and b(1) and not b(0)",0);
236 beg_def_sig ("wck(3)" ,"cke and wram and not b(3) and not b(2) and b(1) and b(0)",0);
237 beg_def_sig ("wck(4)" ,"cke and wram and not b(3) and b(2) and not b(1) and not b(0)",0);
238 beg_def_sig ("wck(5)" ,"cke and wram and not b(3) and b(2) and not b(1) and b(0)",0);
239 beg_def_sig ("wck(6)" ,"cke and wram and not b(3) and b(2) and b(1) and not b(0)",0);
240 beg_def_sig ("wck(7)" ,"cke and wram and not b(3) and b(2) and b(1) and b(0)",0);
241 beg_def_sig ("wck(8)" ,"cke and wram and b(3) and not b(2) and not b(1) and not b(0)",0);
242 beg_def_sig ("wck(9)" ,"cke and wram and b(3) and not b(2) and not b(1) and b(0)",0);
243 beg_def_sig ("wck(10)" ,"cke and wram and b(3) and not b(2) and b(1) and not b(0)",0);
244 beg_def_sig ("wck(11)" ,"cke and wram and b(3) and not b(2) and b(1) and b(0)",0);
245 beg_def_sig ("wck(12)" ,"cke and wram and b(3) and b(2) and not b(1) and not b(0)",0);
246 beg_def_sig ("wck(13)" ,"cke and wram and b(3) and b(2) and not b(1) and b(0)",0);
247 beg_def_sig ("wck(14)" ,"cke and wram and b(3) and b(2) and b(1) and not b(0)",0);
248 beg_def_sig ("wck(15)" ,"cke and wram and b(3) and b(2) and b(1) and b(0)",0);
250 beg_def_biloop ("ram(j+4*i)" ,"not wck(i) and not wck(i)'stable","sh_ram(j)","i(15:0)","j(3:0)",33,BEG_REG
);
252 beg_def_mux ("rb(3:0)" ,"b(3:0)" ,"0x0" ,"not ram (3:0)" ,0);
253 beg_def_mux ("rb(3:0)" ,0 ,"0x1" ,"not ram (7:4)" ,0);
254 beg_def_mux ("rb(3:0)" ,0 ,"0x2" ,"not ram(11:8)" ,0);
255 beg_def_mux ("rb(3:0)" ,0 ,"0x3" ,"not ram(15:12)",0);
256 beg_def_mux ("rb(3:0)" ,0 ,"0x4" ,"not ram(19:16)",0);
257 beg_def_mux ("rb(3:0)" ,0 ,"0x5" ,"not ram(23:20)",0);
258 beg_def_mux ("rb(3:0)" ,0 ,"0x6" ,"not ram(27:24)",0);
259 beg_def_mux ("rb(3:0)" ,0 ,"0x7" ,"not ram(31:28)",0);
260 beg_def_mux ("rb(3:0)" ,0 ,"0x8" ,"not ram(35:32)",0);
261 beg_def_mux ("rb(3:0)" ,0 ,"0x9" ,"not ram(39:36)",0);
262 beg_def_mux ("rb(3:0)" ,0 ,"0xa" ,"not ram(43:40)",0);
263 beg_def_mux ("rb(3:0)" ,0 ,"0xb" ,"not ram(47:44)",0);
264 beg_def_mux ("rb(3:0)" ,0 ,"0xc" ,"not ram(51:48)",0);
265 beg_def_mux ("rb(3:0)" ,0 ,"0xd" ,"not ram(55:52)",0);
266 beg_def_mux ("rb(3:0)" ,0 ,"0xe" ,"not ram(59:56)",0);
267 beg_def_mux ("rb(3:0)" ,0 ,"0xf" ,"not ram(63:60)",0);
269 beg_def_mux ("ra(3:0)" ,"a(3:0)" ,"0x0" ,"not ram (3:0)" ,0);
270 beg_def_mux ("ra(3:0)" ,0 ,"0x1" ,"not ram (7:4)" ,0);
271 beg_def_mux ("ra(3:0)" ,0 ,"0x2" ,"not ram(11:8)" ,0);
272 beg_def_mux ("ra(3:0)" ,0 ,"0x3" ,"not ram(15:12)",0);
273 beg_def_mux ("ra(3:0)" ,0 ,"0x4" ,"not ram(19:16)",0);
274 beg_def_mux ("ra(3:0)" ,0 ,"0x5" ,"not ram(23:20)",0);
275 beg_def_mux ("ra(3:0)" ,0 ,"0x6" ,"not ram(27:24)",0);
276 beg_def_mux ("ra(3:0)" ,0 ,"0x7" ,"not ram(31:28)",0);
277 beg_def_mux ("ra(3:0)" ,0 ,"0x8" ,"not ram(35:32)",0);
278 beg_def_mux ("ra(3:0)" ,0 ,"0x9" ,"not ram(39:36)",0);
279 beg_def_mux ("ra(3:0)" ,0 ,"0xa" ,"not ram(43:40)",0);
280 beg_def_mux ("ra(3:0)" ,0 ,"0xb" ,"not ram(47:44)",0);
281 beg_def_mux ("ra(3:0)" ,0 ,"0xc" ,"not ram(51:48)",0);
282 beg_def_mux ("ra(3:0)" ,0 ,"0xd" ,"not ram(55:52)",0);
283 beg_def_mux ("ra(3:0)" ,0 ,"0xe" ,"not ram(59:56)",0);
284 beg_def_mux ("ra(3:0)" ,0 ,"0xf" ,"not ram(63:60)",0);
286 befig
= beg_get_befig (0);
288 befig2
= beh_duplicate(befig
);
290 befig2
->NAME
= namealloc("duplication");
292 befig2
->NAME
= namealloc("biterizing");
293 beh_biterize(befig2
);
295 beh_frebefig(befig2
);
311 beg_def_befig(namealloc("testconflict"));
313 for (i
= 0; i
< 128; i
++)
315 sprintf(buf
[1],"outsaen=0b1 and dat(%d)=0b1 and daf(%d)=0b0",i
,i
);
316 sprintf(buf
[0],"dati(%d)",i
);
317 beg_def_process (buf
[0] ,buf
[1],"0b1",0,BEG_REG
);
319 sprintf(buf
[1],"outsaen=0b1 and dat(%d)=0b0 and daf(%d)=0b1",i
,i
);
320 sprintf(buf
[0],"dati(%d)",i
);
321 beg_def_process (buf
[0] ,buf
[1],"0b0",0,BEG_REG
|BEG_PRE
);
326 befig
= beg_get_befig (0);
328 beg_def_befig(namealloc("testconflict2"));
329 for (i
= 0; i
< 128; i
++)
332 "(dafi(%d)=0b0 and dinla%d_net202=0b0) or "
333 "dinla%d_dinbpdw=0b1",i
,
336 sprintf(buf
[0],"dati(%d)",i
);
337 beg_def_process (buf
[0] ,buf
[1],"0b0",0,BEG_REG
);
340 "(dafi(%d)=0b1 and dinla%d_net202=0b0) or "
341 "(dinla%d_dinbpup=0b0 and dinla%d_net202=0b0) or "
342 "dinla%d_dinipup=0b0",i
,
344 //128-i,128-i,128-i,128-i);
345 sprintf(buf
[0],"dati(%d)",i
);
346 beg_def_process (buf
[0] ,buf
[1],"0b0",0,BEG_REG
|BEG_PRE
);
350 fig
= beg_get_befig(0);
353 beg_eat_figure(befig
);
355 fig
= beg_get_befig(0);
363 /****************************************************************************/
364 void printhour(time_t tim
)
373 if (h
) printf("%d:",h
);
374 if (m
) printf("%2d'",m
);
375 printf("%2d\" - OK\n",s
);
378 /*}}}************************************************************************/
381 int main(int argc
, char **argv
)
388 char dat
[1024],sig
[1024], nsig
[1024], cmd
[1024], fig
[1024], mem
[1024], *mainfig
;
389 int i
, j
, k
, l
, m
, n
;
391 time_t cur
, beg
, bef
, ela
;
396 test
= (argc
> 1) ? atoi(argv
[1]) : 6;
403 case 1 : // test -1- parser d'expression
405 str
= namealloc("je(3 downto 1) & xab & (('1'&'0') "
406 "and test(1 downto 0) ) & (le xor premier)");
407 printf("Test de : \"%s\"\n",str
);
408 abl
= beg_genStr2Abl(str
);
410 str
= namealloc("a and b and c and d");
411 printf("Test de : \"%s\"\n",str
);
412 abl
= beg_genStr2Abl(str
);
414 str
= namealloc("not ck'stable");
415 printf("Test de : \"%s\"\n",str
);
416 abl
= beg_genStr2Abl(str
);
418 str
= namealloc("ck'event and r");
419 printf("Test de : \"%s\"\n",str
);
420 abl
= beg_genStr2Abl(str
);
422 str
= namealloc("ck'stable");
423 printf("Test de : \"%s\"\n",str
);
424 abl
= beg_genStr2Abl(str
);
427 case 2 : // test -2- inversion d'expression
433 case 3 : // test -3- parser de bit string
435 if (!strcmp("\"111101011010001001\"",beg_genBitStr("0O 7_5_3211")))
438 printf("Test FAILED\n");
439 if (!strcmp("\"10101010101111010001000001111001010100010011\"",
440 beg_genBitStr("0X aAbD1079513")))
443 printf("Test FAILED\n");
448 abl
= createBitStr(genUBitStr(10));
451 str
= namealloc("a and b");
452 abl2
= beg_genStr2Abl(str
);
455 changeAblAtRange(abl
,0,0,abl2
,1);
456 printf("changeAblAtRange (abl,5,5,abl2,0) :");
458 abl
= createBitStr(genHZBitStr(10));
463 changeAblAtRange(abl
,5,5,abl2
,1);
464 printf("changeAblAtRange (abl,5,5,abl2,0) :");
466 abl
= beg_genStr2Abl(namealloc("test(10:4)"));
471 changeAblAtRange(abl
,5,5,abl2
,2);
472 printf("changeAblAtRange (abl,5,5,abl2,0) :");
474 str
= namealloc("je(3 downto 1) & 0x ab & (('1'&'0') "
475 "and test(1 downto 0) ) & (le xor premier)");
476 abl
= beg_genStr2Abl(str
);
479 if (!changeAblAtRange(abl
,10,10,abl2
,2))
481 printf("changeAblAtRange (abl,10,10,abl2,0) :");
483 str
= namealloc("^4 b(3:1)");
484 abl
= beg_genStr2Abl(str
);
487 repToCatVectAbl(abl
);
494 // str = namealloc("testrigolo2, 1");
495 // str3 = beg_changeName(str,str,"i",0,1);
497 // printf("%s#\n",str3);
499 // printf("erreur\n");
501 // str2 = mbkstrdup("testrigolo2, 1");
502 // // str3 = beg_changeName(str,str2,"i",1,1);
504 // printf("%s#\n",str3);
506 // printf("erreur\n");
507 // str2 = namealloc("testrigolo2, 2");
508 // // str3 = beg_changeName(str,str2,"i",2,1);
510 // printf("%s#\n",str3);
512 // printf("erreur\n");
513 // str2 = namealloc("testrigolo1, 3");
514 // // str3 = beg_changeName(str,str2,"i",3,1);
516 // printf("%s#\n",str3);
518 // printf("erreur\n");
519 // str2 = namealloc("testrigolo2, 4");
520 // // str3 = beg_changeName(str,str2,"i",4,1);
522 // printf("%s#\n",str3);
524 // printf("erreur\n");
525 // str2 = namealloc("testrigolo2, 5");
526 // // str3 = beg_changeName(str,str2,"i",5,1);
528 // printf("%s#\n",str3);
530 // printf("erreur\n");
532 case 6 : // test -6- generation de beh + driver vectoriel
534 beg_def_befig("testchip");
536 beg_def_por ("tet(1)",'I');
537 beg_def_por ("s" ,'O');
538 beg_def_por ("a" ,'I');
539 beg_def_por ("b(8:0)",'O');
540 beg_def_por ("t(0:4)",'O');
541 beg_def_por ("z(5:2)",'O');
542 beg_def_por ("y(7:0)",'O');
545 beg_assertion("ck and ck'event" ,"horloge stable",'W',"horloge1");
546 beg_assertion("ck and ck'stable" ,"horloge stable",'W',"horloge2");
547 beg_assertion("ck and not ck'stable(23)" ,"horloge stable",'W',"horloge3");
548 beg_assertion("ck and ck'event and a" ,"horloge stable",'W',"horloge4");
549 beg_assertion("a" ,"horloge stable",'W',"horloge5");
552 beg_def_sig ("b(8)" ,"r and tet(1)" ,156);
553 beg_def_sig ("b(2:0)" ,"0b 011" ,156);
554 beg_def_sig ("b(5:3)" ,"0b 101" ,156);
555 beg_def_sig ("t(3:4)" ,"c(2:1)" ,156);
556 beg_def_sig ("t(0:2)" ,"c(3:1)" ,156);
557 beg_def_sig ("e(4)" ,"c(4)" ,156);
558 beg_def_sig ("k" ,"c(4)" ,156);
559 beg_def_sig ("c(3:1)" ,"(a and r) & '0' & tet(1)" ,254);
561 // test of multiplexer
562 beg_def_mux ("u" ,"ab(5:4)" ,"0b 11" ,"f and e(4)" ,26);
563 beg_def_mux ("u" ,0 ,"0b 01" ,"c(3) and e(4)",27);
564 beg_def_mux ("u" ,0 ,"0b 10" ,"c(3)" ,23);
566 beg_def_mux ("x(5:4)" ,"ab(5:4)" ,"0b 01" ,"d(4) & e(4)" ,29);
567 beg_def_mux ("x(5:4)" ,"ab(5:4)" ,"0b 11" ,"c(3) & e(4)" ,27);
568 beg_def_mux ("x(5:4)" ,"ab(5:4)" ,"default" ,"b(4) & e(4)" ,28);
571 beg_def_process("r" ,"not ck and ck'event and cm" ,"c(3) and e(4)",26,BEG_REG
);
573 beg_def_process("r2" ,"cm" ,"c(3) and e(4)",26,BEG_REG
);
574 beg_def_process("r2" ,"not cm" ,"c(3) and e(4)",26,BEG_REG
|BEG_PRE
);
576 beg_def_process("r3(2)" ,"cm" ,"c(3) and e(4)",26,BEG_REG
);
577 beg_def_process("r3(2)" ,"not cm" ,"c(3) and e(4)",26,BEG_REG
);
579 beg_def_process("q(2:0)" ,"ck and ck'event and cm" ,"c(3)&r&r" ,26,BEG_REG
);
580 beg_def_process("q(2:0)" ,"ck and ck'event and not cm" ,"c(3)&r&r" ,26,BEG_REG
);
582 beg_def_process("s" ,"ck" ,"c(3) and e(4)",26,BEG_BUS
);
583 beg_def_process("s" ,"d(2:4)" ,"c(3) and e(4)",26,BEG_BUS
|BEG_PRE
);
586 beg_def_process("y(3:0)" ,"not d(2:4) & c(3)","c(3:0)" ,23,BEG_BUS
);
587 beg_def_process("y(7:6)" ,"not d(2:4) & c(3)","c(4) & e(4)" ,23,BEG_BUS
);
588 beg_def_process("y(5:4)" ,"not (a) & a" ,"c(3) & e(4)" ,24,BEG_BUS
);
589 beg_def_process("y(5:4)" ,"a & not a" ,"b(4) & e(4)" ,25,BEG_BUS
);
590 beg_def_process("y(5:4)" ,"^2 a" ,"d(4) & e(4)" ,26,BEG_BUS
);
592 // test of preconditionned bus
593 beg_def_process("z(5:4)" ,"not (a) & a" ,"c(3) & e(4)" ,27,BEG_BUS
|BEG_PRE
);
594 beg_def_process("z(5:4)" ,"f & not a" ,"b(4) & e(4)" ,28,BEG_BUS
|BEG_PRE
);
595 beg_def_process("z(5:4)" ,"^2 a" ,"d(4) & e(4)" ,29,BEG_BUS
|BEG_PRE
);
598 beg_def_loop ("n(i)" ,"com(i)","g(i)" ,"i(0:8)" ,33,0);
599 beg_def_loop ("n(i)" ,"m(i)" ,"g(i)" ,"i(0:8)" ,33,0);
600 beg_def_loop ("n(i)" ,"g(i)" ,"m(i)" ,"i(0:8)" ,33,0);
602 // test of mixed loop and non loop
603 beg_def_process("nn(9)" ,"g(4)" ,"m(4)" ,33,BEG_REG
);
604 beg_def_loop ("nn(9)" ,"ck and ck'event and not com(j)","d(j)","j(0:8)",33,BEG_REG
);
605 beg_def_process("nn(9)" ,"g(4)" ,"m(4)" ,33,BEG_REG
);
607 // test of mulitple loop
608 beg_def_loop ("m(i)" ,"ck and ck'event and com(i)" ,"g(i)","i(0:8)",33,BEG_REG
);
609 beg_def_loop ("m(i)" ,"ck and ck'event and not com(i)","d(i)","i(0:8)",33,BEG_REG
);
610 beg_def_loop ("m(j)" ,"ck and ck'event and not com(j)","d(j)","j(0:8)",33,BEG_REG
);
611 beg_def_process("m(9)" ,"ck and ck'event and not com(9)","d(9)",33,BEG_REG
);
613 // test of single conditionned by loop
614 beg_def_loop ("h" ,"ck and ck'event and not com(j)","d(j)","j(0:8)",33,BEG_REG
);
616 // test of vector conditionned by loop
617 beg_def_loop ("nm(9:5)" ,"not com(j)","nm(9:5)" ,"j(0:8)" ,33,0);
620 beg_def_biloop ("o(j+8*i)" ,"ck and ck'event and not com(j)","d(i)","i(9:6)","j(8:0)",33,BEG_REG
);
622 // test of loop detection
623 beg_def_process("ld(2)" ,"ck and ck'event and g(3)","m(2)" ,33,BEG_REG
);
624 beg_def_process("ld(3)" ,"ck and ck'event and g(4)","m(3)" ,33,BEG_REG
);
625 beg_def_process("ld(4)" ,"ck and ck'event and g(5)","m(4)" ,36,BEG_REG
);
626 beg_def_process("ld(5)" ,"ck and ck'event and g(6)","m(5)" ,33,BEG_REG
);
628 beg_def_process("lv(2)" ,"ck and ck'event" ,"m(2)" ,33,BEG_REG
);
629 beg_def_process("lv(3)" ,"ck and ck'event" ,"m(3)" ,33,BEG_REG
);
630 beg_def_process("lv(4)" ,"ck and ck'event" ,"m(4)" ,36,BEG_REG
);
632 beg_def_process("lv(5)" ,"toto(3) and toto(5)" ,"m(5)" ,33,BEG_REG
);
633 beg_def_process("lv(5)" ,"toto(4) and toto(6)" ,"m(5)" ,33,BEG_REG
);
634 beg_def_process("lv(5)" ,"toto(5) and toto(7)" ,"m(5)" ,33,BEG_REG
);
635 beg_def_process("lv(5)" ,"toto(6) and toto(8)" ,"m(5)" ,33,BEG_REG
);
637 beg_def_process("lvb(5)" ,"toto(3) and toto(5)" ,"m(5)" ,33,BEG_REG
);
638 beg_def_process("lvb(5)" ,"toto(4) and toto(6)" ,"m(5)" ,33,BEG_REG
);
640 beg_def_process("lvb(6)" ,"toto(3) and toto(5)" ,"m(6)" ,33,BEG_REG
);
641 beg_def_process("lvb(6)" ,"toto(4) and toto(6)" ,"m(6)" ,33,BEG_REG
);
644 befig
= beg_get_befig(0);
646 beg_def_befig ("testeat");
647 beg_def_por ("y(7:0)",'O');
648 beg_def_por ("s" ,'O');
649 beg_def_por ("se 1" ,'O');
650 beg_def_por ("se 2" ,'O');
652 //obj = beg_getObjByName(befig,namealloc("lv"),str);
653 //printf("test getObjByName %s %d:%d\n",beg_getName(obj),beg_getLeft(obj),
654 // beg_getRight(obj));
656 beg_eat_figure (befig
);
661 befig
= beg_get_befig (0);
667 case 7 : // perform addacu test
671 case 8 : // perform amd test
674 case 9 : // perform addacu test
676 beg_def_befig ("biloop");
678 //beg_def_por ("m(0:3)" ,'I');
679 //beg_def_por ("b(0:3)" ,'I');
682 //beg_def_process ("m(0)" ,"b(0)" ,"0b1" ,0,BEG_REG);
683 beg_def_loop ("m(i)" ,"c(i)" ,"0b1" ,"i(0:7)",33,BEG_REG
);
685 //beg_def_process ("m(1)" ,"b(1)" ,"0b1" ,0,BEG_REG);
686 beg_def_loop ("m(i+8)" ,"c(i+8)" ,"0b1" ,"i(0:7)",33,BEG_REG
);
688 //beg_def_process ("m(2)" ,"b(2)" ,"0b1" ,0,BEG_REG);
689 beg_def_loop ("m(i+16)" ,"c(i+16)" ,"0b1" ,"i(0:7)",33,BEG_REG
);
691 //beg_def_process ("m(3)" ,"b(3)" ,"0b1" ,0,BEG_REG);
692 beg_def_loop ("m(i+24)" ,"c(i+24)" ,"0b1" ,"i(0:7)",33,BEG_REG
);
697 befig
= beg_get_befig (0);
716 befig_list
*fig
[size
];
718 for (l
= 0; l
< size
; l
++)
720 sprintf(buf
[3],"tmp_%d",l
);
721 beg_def_befig(buf
[3]);
722 sprintf(buf
[4],"blt(%d:%d)",3+4*l
,4*l
);
723 beg_def_por(buf
[4],'O');
724 for (i
= 0; i
< 1024; i
++)
725 for (j
= 0; j
< 4; j
++)
727 sprintf(buf
[0],"blt(%d)",j
+4*l
);
728 sprintf(buf
[1],"lwl(%d)=0b1 and mem(%d)=0b0",-i
+1023,-i
+j
*1024+4096*l
+1023);
729 sprintf(buf
[2],"lwl(%d)=0b1 and mem(%d)=0b1",-i
+1023,-i
+j
*1024+4096*l
+1023);
731 beg_def_process (buf
[0] ,buf
[1],"0b1",0,BEG_REG
);
732 beg_def_process (buf
[0] ,buf
[2],"0b0",0,BEG_REG
| BEG_PRE
);
736 fig
[l
] = beg_get_befig (0);
740 beg_def_befig("testEatBeforeCompact");
741 for (l
= 0; l
< size
; l
++)
742 beg_eat_figure(fig
[size
-1 - l
]);
744 befig
= beg_get_befig (0);
746 befig
->NAME
= "testCompact";
749 befig
= beg_get_befig (0);
763 befig_list
*fig
[size
];
766 beg_def_befig(namealloc("testcompactbiabl"));
767 beg_def_por("testpor(0:11)",'I');
769 for (j
= 0; j
< size
; j
++)
771 sprintf(buf
[2],"tmp_%d",j
);
772 beg_def_befig(buf
[2]);
773 for (i
= 0; i
< 128; i
++)
775 sprintf(buf
[0],"dat(%d)=0b0",i
);
777 "multi_spl9bs_saenb(%d)=0b1"
779 "multi_spl9bs_blfi(%d)=0b0"
780 ,i
*2+j
*256 ,i
+j
*128);
782 beg_def_process (buf
[0] ,buf
[1],"0b0",0,BEG_REG
);
786 fig
[j
] = beg_get_befig(0);
789 beg_def_befig(namealloc("testcompactbiabl"));
791 for (j
= 0; j
< size
; j
++)
792 beg_eat_figure(fig
[/*size-1 - */j
]);
796 befig
= beg_get_befig (0);
805 beg_def_befig ("testifendif");
806 beg_def_process("z" ,"not(a)" ,"c(3)" ,0,BEG_BUS
);
807 beg_def_process("z" ,"a" ,"c(4)" ,0,BEG_BUS
|BEG_PRE
);
808 befig
= beg_get_befig (0);
812 beg_def_befig ("edge_pb");
813 beg_def_process("z" ,"a and a'event and i" ,"'1'",0 ,BEG_REG
);
814 beg_def_process("z" ,"a and a'event and not i" ,"'0'",0,BEG_REG
);
815 befig
= beg_get_befig (0);
821 for (i
= 0; i
< 4; i
++)
823 sprintf(fig
,"por_pb_col%d",i
);
824 beg_def_befig (namealloc(fig
));
826 sprintf(sig
,"lblt(%d)",i
);
827 beg_def_por (sig
,'B');
828 sprintf(nsig
,"lblf(%d)",i
);
829 beg_def_por (nsig
,'B');
830 for (j
= 0; j
< 8; j
++)
832 sprintf(cmd
,"com(%d) and %s and not %s",j
,sig
,nsig
);
833 sprintf(mem
,"mem(%d)",j
);
834 beg_def_process(mem
,cmd
,"'1'",0,BEG_REG
);
836 sprintf(cmd
,"com(%d) and %s and not %s",j
,nsig
,sig
);
837 beg_def_process(mem
,cmd
,"'0'",0,BEG_REG
|BEG_PRE
);
839 sprintf(cmd
,"com(%d) and %s",j
,mem
);
840 beg_def_process(sig
,cmd
,"'1'",0,BEG_REG
);
841 beg_def_process(nsig
,cmd
,"'0'",0,BEG_REG
);
843 sprintf(cmd
,"com(%d) and not %s",j
,mem
);
844 beg_def_process(sig
,cmd
,"'0'",0,BEG_REG
|BEG_PRE
);
845 beg_def_process(nsig
,cmd
,"'1'",0,BEG_REG
|BEG_PRE
);
850 befig
= beg_get_befig (0);
851 //savebefig(befig,0);
852 list
= addchain(list
,befig
);
855 beg_def_befig ("por_pb_mux");
856 beg_def_por ("gblt",'B');
857 beg_def_por ("gblf",'B');
858 for (i
= 0; i
< 4; i
++)
861 sprintf (sig
,"lblt(%d)",i
);
862 sprintf (cmd
,"sel(%d) and wclk",i
);
863 beg_def_process (sig
,"not prech","'1'",0,BEG_REG
);
864 beg_def_process (sig
,cmd
,"gblt",0,BEG_REG
);
866 sprintf (sig
,"lblf(%d)",i
);
867 beg_def_process (sig
,"not prech","'1'",0,BEG_REG
);
868 beg_def_process (sig
,cmd
,"gblf",0,BEG_REG
);
870 sprintf (cmd
,"sel(%d) and not wclk",i
);
871 sprintf (dat
,"lblt(%d)",i
);
872 beg_def_process ("gblt",cmd
,dat
,0,BEG_REG
);
874 sprintf (dat
,"lblf(%d)",i
);
875 beg_def_process ("gblf",cmd
,dat
,0,BEG_REG
);
880 befig
= beg_get_befig (0);
881 //savebefig(befig,0);
883 beg_def_befig ("por_pb_top");
884 for (; list
; list
= delchain(list
,list
))
885 beg_eat_figure(list
->DATA
);
889 befig2
= beg_get_befig (0);
890 //savebefig(befig2,0);
892 beg_eat_figure (befig
);
893 befig
= beg_get_befig (0);
898 befig
= beg_get_befig (0);
902 /*}}}************************************************************************/
904 beg_def_befig ("testCompact");
905 for (i
= 0; i
< 2; i
++)
906 for (j
= 0; j
< 3; j
++)
908 sprintf(sig
,"s(%d)",3*i
+j
);
909 beg_def_process(sig
,"gnd" , "'1'", 0, BEG_REG
);
910 sprintf(cmd
,"mblt(%d) or blf(%d)",i
,j
);
911 sprintf(dat
,"blf(%d)",i
);
912 beg_def_process(sig
, cmd
, dat
, 0, BEG_REG
);
917 befig
= beg_get_befig (0);
922 // bug concerning hasardous loop given by driver
924 /*-------------------------*/
926 printf(" Constructing the Main figure");
929 mainfig
= namealloc("testloop");
931 beg_def_befig (mainfig
);
932 for (k
= 0; k
< 16; k
++)
933 for (j
= 0; j
< 32; j
++)
934 for (i
= 0; i
< 128; i
++)
936 sprintf(sig
,"mblf(%d)",j
+k
*32);
937 sprintf(cmd
,"wl(%d)",i
+k
*128);
938 beg_def_process(sig
, cmd
, "'0'", i
+25 , BEG_REG
);
939 sprintf(cmd
,"mem(%d)",i
+j
*128+k
*4096);
940 beg_def_process(sig
, cmd
, "'0'", i
+25 , BEG_REG
|BEG_PRE
);
942 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
946 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
948 for (k
= 0; k
< 2; k
++)
950 printf(" Compact n°%d",k
);
952 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
955 befig
= beg_get_befig (0);
957 /*-------------------------*/
960 beg_def_befig (namealloc("int_fig"));
962 for (k
= 0; k
< 16; k
++)
964 sprintf(fig
,"int_fign%d",k
);
965 printf(" building %s\n",fig
);
967 beg_def_befig (namealloc(fig
));
968 for (j
= 0; j
< 8; j
++)
969 for (i
= 0; i
< 4; i
++)
971 sprintf(sig
,"mblf(%d)",i
+j
*4+k
*32);
972 sprintf(cmd
,"not b(%d)",k
);
973 beg_def_process(sig
, cmd
, "'0'", 0, BEG_REG
);
974 sprintf(cmd
,"b(%d)",k
);
975 beg_def_process(sig
, cmd
, "'0'", 0, BEG_REG
|BEG_PRE
);
976 sprintf(cmd
,"(not mblt(%d) or mblf(%d) and (not mblf(%d) or mblt(%d))) and ((iBLF(%d) and not iBLT(%d)) or (iBLT(%d) and not iBLF(%d))) and LSEL(%d) ",
977 i
+j
*4+k
*32,i
+j
*4+k
*32,i
+j
*4+k
*32,i
+j
*4+k
*32,j
,j
,j
,j
,i
+k
*4);
978 beg_def_process(sig
, cmd
, "'0'", 0, BEG_REG
);
983 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
985 for (j
= 0; j
< 3; j
++)
987 printf(" Compact %d-n°%d",k
,j
);
989 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
992 befig
= beg_get_befig(0);
993 beg_def_befig (namealloc("int_fig"));
995 printf(" eat figure");
996 beg_eat_figure (befig
);
997 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1000 /*-------------------------*/
1001 printf("Phase 3\n");
1004 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1006 for (k
= 0; k
< 3; k
++)
1008 printf(" Compact n°%d",k
);
1010 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1013 befig
= beg_get_befig (0);
1015 /*-------------------------*/
1016 printf("Phase 4\n");
1018 printf(" eating figure");
1019 beg_def_befig (mainfig
);
1020 befig
= beg_get_befig(0);
1022 beg_def_befig(namealloc("int_fig"));
1023 beg_eat_figure(befig
);
1024 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1028 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1030 for (k
= 0; k
< 1; k
++)
1032 printf(" Compact n°%d",k
);
1034 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1037 befig
= beg_get_befig (0);
1040 time(&cur
);ela
=cur
-bef
;bef
=cur
;printhour(ela
);
1043 printf("total time:");
1047 /*}}}************************************************************************/
1049 return EXIT_SUCCESS
;