Index: mttroot/mtt/bin/trans/m/cbg2ese.m ================================================================== --- mttroot/mtt/bin/trans/m/cbg2ese.m +++ mttroot/mtt/bin/trans/m/cbg2ese.m @@ -21,10 +21,13 @@ ## ############################################################### ## ## Version control history ## ############################################################### ## ## $Id$ ## ## $Log$ + ## ## Revision 1.44 2001/11/11 18:12:30 geraint + ## ## Moved fflush(structure_file) out of loop. + ## ## ## ## Revision 1.43 2001/11/11 08:32:00 geraint ## ## fflush (structure_file). ## ## ## ## Revision 1.42 2001/04/23 16:23:30 gawthrop ## ## Now stips ; from bottlom level argument list - allows aliasing of @@ -192,12 +195,20 @@ full_name = system_name; full_name_repetition = system_name; system_type = system_name; else full_name = [full_name, "_", system_name]; - full_name_repetition = [full_name_repetition, ... - "_", system_name, "_", num2str(repetition)]; + + if (repetition>1) + full_name_repetition = [full_name_repetition, \ + "_", system_name, "_", \ + num2str(repetition)]; + else + full_name_repetition = [full_name_repetition, \ + "_", system_name]; + endif + end; cbg_name = [full_name, "_cbg"]; @@ -371,12 +382,21 @@ ## Link up the bonds for this compound component fprintf(ese_file, ... "\n\t%s Equations linking up subsystem %s (%s)\n\n", ... pc, comp_name, subsystem.type); - name_comp_name = sprintf("%s_%s_%d", ... - full_name_repetition, comp_name, k); + + if (k>1) + name_comp_name = sprintf("%s_%s_%d", ... + full_name_repetition, \ + comp_name, k); + else + name_comp_name = sprintf("%s_%s", ... + full_name_repetition, \ + comp_name); + endif + printf("\n\t%s Equations linking up subsystem %s (%s)\n\n",\ pc, comp_name, subsystem.type); u_index = 0; y_index = 0; ## Count the inputs and outputs