Index: mttroot/mtt/bin/trans/awk/rbg_fig2m.awk ================================================================== --- mttroot/mtt/bin/trans/awk/rbg_fig2m.awk +++ mttroot/mtt/bin/trans/awk/rbg_fig2m.awk @@ -11,10 +11,15 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.29 1998/04/12 12:35:32 peterg +## Named and unnamed SS handled in a uniform manner - in particular, the +## attributes are passed through +## wrote_component function used. +## ## Revision 1.28 1998/04/06 08:41:48 peterg ## Fixed bug due to adding (and then removing) 0 and 1 as port types ## ## Revision 1.27 1998/04/04 10:54:58 peterg ## Remove a debugging print statement @@ -300,16 +305,15 @@ named_component = (match(str,delimiter) > 0); if (named_component) { split(str,a,delimiter); type = a[1]; name = a[2]; - # Check if name is in label file and if used already found = 0; name_used = 0; for (i=1; i<=i_label; i++) { lname = label[i,1]; - if ( exact_match(name,lname) ) { + if ( lname==name ) { found = 1; if (name in used) { name_used = 1; CR = label[i,2]; args = label[i,3]; @@ -319,21 +323,19 @@ } break } } - if (!found) { - if (isa_plain_component) { - printf(warning_f, name) - } - i_label++; - CR = default_cr; - args = ""; - label[i_label,1] = name; - label[i_label,2] = CR; - label[i_label,3] = args - } +if (!found) { +printf(warning_f, name); +i_label++; +CR = default_cr; +args = ""; +label[i_label,1] = name; +label[i_label,2] = CR; +label[i_label,3] = args +} # Give it a new entry if already used # -- also tell user as it is an error now(?) if (name_used) { printf(warning_u, name); @@ -629,21 +631,25 @@ printf("];\n\n") >> b_file; printf("port_name = [\n") >> b_file; for (i = 1; i <= i_port; i++) { split(ports[i],a, " "); - # Remove the [] - name = substr(a[3],2,length(a[3])-2); + # Dont Remove the [] + # name = substr(a[3],2,length(a[3])-2); + name = a[3]; printf("'%s'\n", name) >> b_file; } printf("];\n\n") >> b_file; # Print the (external) port list -# printf("n_ports = %1.0f;\n", i_port_component) >> b_file; printf("port_list = [\n") >> b_file; - for (i = 1; i <= i_port_component; i++) - printf("'%s'\n", port_labels[i]) >> b_file; + for (i = 1; i <= i_label; i++) { + name = label[i,1]; + if (match(name,port_regexp)) + printf("'%s'\n", name) >> b_file; + } printf("];\n\n") >> b_file; } + Index: mttroot/mtt/bin/trans/m/rbg2abg.m ================================================================== --- mttroot/mtt/bin/trans/m/rbg2abg.m +++ mttroot/mtt/bin/trans/m/rbg2abg.m @@ -3,10 +3,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.24 1998/02/19 08:57:16 peterg +% %% Fixed mtt-info bug -- confused filename with number +% %% % %% Revision 1.23 1997/12/04 14:24:22 peterg % %% Removed error message about through-pointing arrows % %% % %% Revision 1.22 1997/09/18 19:49:37 peterg % %% Added test for uniquness of bonds on a component -- if non-unique @@ -408,14 +411,14 @@ if direction(1)==direction(2) % Wrong way for default % mtt_info(['Two-port ', comp_name, ' (', comp_type, ') does not have through-pointing arrows'], fnum); end; if direction(1)==1 %in % mtt_info([comp_name, ' in'],fnum); - unsorted_port_list = ['in';'out']; + unsorted_port_list = ['[in]';'[out]']; else %reverse the order % mtt_info([comp_name, ' out'],fnum); - unsorted_port_list = ['out';'in']; + unsorted_port_list = ['[out]';'[in]']; end; end; % Recompute the number of unsorted ports [n_unsorted_ports,m_unsorted_ports] = size(unsorted_port_list); Index: mttroot/mtt/lib/comp/simple/comp_ports.m ================================================================== --- mttroot/mtt/lib/comp/simple/comp_ports.m +++ mttroot/mtt/lib/comp/simple/comp_ports.m @@ -12,10 +12,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.4 1998/03/31 08:39:31 peterg +% %% Added EBTF +% %% % %% Revision 1.3 1997/11/21 11:32:57 peterg % %% N ports numbered 1..N % %% % %% Revision 1.2 1997/08/28 08:08:24 peterg % %% Added RS component to the two-port list @@ -31,31 +34,31 @@ two_ports = '-TF-GY-AE-AF-FMR-RS-EBTF-'; N_ports = '-R-C-I-'; comp_type = ['-', comp_type, '-']; if length(findstr(comp_type,junctions))==1 - ports = ['undefined]']; + ports = ['[undefined]']; elseif length(findstr(comp_type,one_ports))==1 - ports = ['in']; + ports = ['[in]']; elseif length(findstr(comp_type,two_ports))==1 - ports = ['in';'out']; + ports = ['[in]';'[out]']; elseif length(findstr(comp_type,'[-EMTF-]'))==1 - ports = ['in';'out';'mod']; + ports = ['[in]';'[out]';'[mod]']; elseif length(findstr(comp_type,'[-ES-]'))==1 - ports = ['e';'s']; + ports = ['[e]';'[s]']; elseif length(findstr(comp_type,'[-PS-]'))==1 - ports = ['in';'out';'power']; + ports = ['[in]';'[out]';'[power]']; elseif length(findstr(comp_type,N_ports))==1 if N==1 - ports = ['in']; + ports = ['[in]']; elseif N==2 - ports = ['in';'out']; + ports = ['[in]';'[out]']; elseif N>2 - ports = '1'; + ports = '[1]'; for i=2:N ports = [ports; sprintf("%i",i)]; end; end; end;