12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## Revision 1.28 2001/02/05 17:19:52 gawthrop
## Now gives unique names to the states of multiports. Second name
## onwards labeled with port number
##
## Revision 1.27 2000/12/05 12:09:56 peterg
## Changed function name to name()
##
|
>
>
>
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## Revision 1.29 2001/03/29 19:24:14 gawthrop
## Can now use c representations of crs when using -c option
##
## Revision 1.28 2001/02/05 17:19:52 gawthrop
## Now gives unique names to the states of multiports. Second name
## onwards labeled with port number
##
## Revision 1.27 2000/12/05 12:09:56 peterg
## Changed function name to name()
##
|
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
cat $infofile
fi
if [ -z "$partition" ]; then
## Don't partition
# Create the composite ese file
cat $1_ese.r $1_*_ese.r $1_modpar.r > $1_ese.tmp 2>> /dev/null
mv $1_ese.tmp $1_ese.r
# Zap the sub ese files
rm -f $1_*_ese.r
echo "END;" >> $1_ese.r
else # Partition the system
# Save up the full def file
mv $1_def.r mtt_all_def.r
|
|
|
|
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
cat $infofile
fi
if [ -z "$partition" ]; then
## Don't partition
# Create the composite ese file
mtt_xargs.sh cat "$1_ese.r $1_*_ese.r $1_modpar.r" > $1_ese.tmp 2>> /dev/null
mv $1_ese.tmp $1_ese.r
# Zap the sub ese files
mtt_xargs.sh "rm -f" "$1_*_ese.r"
echo "END;" >> $1_ese.r
else # Partition the system
# Save up the full def file
mv $1_def.r mtt_all_def.r
|
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
for i=1:$Nu
printf("MTT_%s_uc(%i,1) := %s_1_MTTu%i;\n", "$subsystem", i, "$subsystem", i);
endfor;
EOF
## Subsystems (Only works when no repetitions at this level)
esefile=${subsystem}_ese.r
echo Creating $esefile
cat ${subsystem}_1_ese.r ${subsystem}_1_*_ese.r > $esefile 2> /dev/null
echo "END;" >> $esefile
## Def file for subsystem
makedef ${subsystem}
echo Creating ${subsystem}_struc.txt
grep $subsystem < $1_struc.txt > ${subsystem}_struc.txt
|
|
|
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
for i=1:$Nu
printf("MTT_%s_uc(%i,1) := %s_1_MTTu%i;\n", "$subsystem", i, "$subsystem", i);
endfor;
EOF
## Subsystems (Only works when no repetitions at this level)
esefile=${subsystem}_ese.r
echo Creating $esefile
mtt_xargs.sh cat "${subsystem}_1_ese.r ${subsystem}_1_*_ese.r" > $esefile 2> /dev/null
echo "END;" >> $esefile
## Def file for subsystem
makedef ${subsystem}
echo Creating ${subsystem}_struc.txt
grep $subsystem < $1_struc.txt > ${subsystem}_struc.txt
|