Overview
Comment: | Converted to uniform port notation - always use [] |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a9f033378feb4db7109e4a641f349095 |
User & Date: | gawthrop@users.sourceforge.net on 1998-04-12 15:01:53 |
Other Links: | branch diff | manifest | tags |
Context
1998-04-12
| ||
15:25:35 | Initial revision check-in: a1bd28f619 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
15:01:53 | Converted to uniform port notation - always use [] check-in: a9f033378f user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
12:35:32 |
Named and unnamed SS handled in a uniform manner - in particular, the attributes are passed through wrote_component function used. check-in: f063875c6c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/awk/rbg_fig2m.awk from [d5523eb723] to [342382370f].
︙ | ︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## 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 ## ## Revision 1.26 1998/04/04 07:29:26 peterg | > > > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## 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 ## ## Revision 1.26 1998/04/04 07:29:26 peterg |
︙ | ︙ | |||
298 299 300 301 302 303 304 | }; named_component = (match(str,delimiter) > 0); if (named_component) { split(str,a,delimiter); type = a[1]; name = a[2]; | < | | < | < | | | | | | | | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | }; 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 ( lname==name ) { found = 1; if (name in used) { name_used = 1; CR = label[i,2]; args = label[i,3]; } else { used[name] = 1 } break } } 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); i_label++; i_name++; |
︙ | ︙ | |||
627 628 629 630 631 632 633 | printf("%s %s\n", a[1], a[2]) >> b_file; } printf("];\n\n") >> b_file; printf("port_name = [\n") >> b_file; for (i = 1; i <= i_port; i++) { split(ports[i],a, " "); | | | > < | > > | > > | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | printf("%s %s\n", a[1], a[2]) >> b_file; } printf("];\n\n") >> b_file; printf("port_name = [\n") >> b_file; for (i = 1; i <= i_port; i++) { split(ports[i],a, " "); # 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("port_list = [\n") >> 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; } |
Modified mttroot/mtt/bin/trans/m/rbg2abg.m from [03870c28de] to [fee4395e24].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,port_coord,port_name,infofile) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% 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 % %% implies same component at both ends of a bond. % %% | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,port_coord,port_name,infofile) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 % %% implies same component at both ends of a bond. % %% |
︙ | ︙ | |||
406 407 408 409 410 411 412 | %Two port defaults if (n_comp_bonds==2)&(n_unsorted_ports==0) 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); | | | | 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | %Two port defaults if (n_comp_bonds==2)&(n_unsorted_ports==0) 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]']; else %reverse the order % mtt_info([comp_name, ' out'],fnum); unsorted_port_list = ['[out]';'[in]']; end; end; % Recompute the number of unsorted ports [n_unsorted_ports,m_unsorted_ports] = size(unsorted_port_list); if m_unsorted_ports==0 n_unsorted_ports = 0; |
︙ | ︙ |
Modified mttroot/mtt/lib/comp/simple/comp_ports.m from [6605b66f42] to [7500ce53df].
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% 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 % %% % %% Revision 1.1 1997/08/02 19:35:47 peterg % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% junctions = '-zero-one-'; one_ports = '-SS-'; 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 | > > > | | | | | | | | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 % %% % %% Revision 1.1 1997/08/02 19:35:47 peterg % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% junctions = '-zero-one-'; one_ports = '-SS-'; 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]']; elseif length(findstr(comp_type,one_ports))==1 ports = ['[in]']; elseif length(findstr(comp_type,two_ports))==1 ports = ['[in]';'[out]']; elseif length(findstr(comp_type,'[-EMTF-]'))==1 ports = ['[in]';'[out]';'[mod]']; elseif length(findstr(comp_type,'[-ES-]'))==1 ports = ['[e]';'[s]']; elseif length(findstr(comp_type,'[-PS-]'))==1 ports = ['[in]';'[out]';'[power]']; elseif length(findstr(comp_type,N_ports))==1 if N==1 ports = ['[in]']; elseif N==2 ports = ['[in]';'[out]']; elseif N>2 ports = '[1]'; for i=2:N ports = [ports; sprintf("%i",i)]; end; end; end; |