Overview
Comment:Still some bugs (vector SS ports)??
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 935e0f3fdad58dddf1dc99164d6b4f47089cb3df5f5fdd550afd83865ffe1df1
User & Date: gawthrop@users.sourceforge.net on 1998-07-28 19:06:43
Other Links: branch diff | manifest | tags
Context
1998-07-28
19:07:48
Writes out N_ports as well as n_ports check-in: 4ff8a799eb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:06:43
Still some bugs (vector SS ports)?? check-in: 935e0f3fda user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:06:11
*** empty log message *** check-in: e27b94cba2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/rbg2abg.m from [70a07044a9] to [1acc00e785].

1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19









+
+
+







function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,\
				      port_coord,port_name,\
				      infofile,errorfile)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.36  1998/07/28 10:30:50  peterg
% %% Implemented vector SS ports.
% %%
% %% Revision 1.35  1998/07/08 15:35:15  peterg
% %% Added errorfile argument
% %%
% %% Revision 1.34  1998/07/02 19:41:29  peterg
% %% Fixed empty port string bug - set to null string.
% %%
% %% Revision 1.33  1998/07/02 17:16:06  peterg
358
359
360
361
362
363
364
365

366
367
368
369
370
371
372
361
362
363
364
365
366
367

368
369
370
371
372
373
374
375







-
+







  end;
end;

bonds = causality;

% Now expand vector ports
[n_bonds,junk] = size(bonds);
n_ports=length(port_bond);
n_ports = length(port_bond);
n_exp_ports=n_ports;
exp_port_name="";
exp_port_bond = [];
%exp_comps = [];
for i=1:n_ports
  port_name_i = port_name(i,:)
  [subport,n_subports] = split_port(port_name_i, ','); % Find the components of the vector port
386
387
388
389
390
391
392
393
394


395
396
397
398
399
400
401
389
390
391
392
393
394
395


396
397
398
399
400
401
402
403
404







-
-
+
+







	mtt_error(['Vector ports ', port_name_i, ' and ', other_port_name, 'are not compatible'],errorfile);
      end
    else 
      mtt_error(['Vector port ', port_name_i, ' has no matching port'], errorfile);
    end;
    
    if other_bond_index>i %then its not been done yet
      mtt_info(['Vector port: ', port_name_i],infofile);
      mtt_info(['matching: ', other_port_name],infofile);
      mtt_info(["Vector port: ", port_name_i],infofile);
      mtt_info(["matching: ", other_port_name],infofile);
      % Remove sign info.
      bond_index = abs(signed_bond_index);
      sig = sign(signed_bond_index);
      
      % Put the first element of each port list in the expanded list
      exp_port_name = [exp_port_name; subport(1,:)];
      exp_port_name = [exp_port_name; other_subport(1,:)];
564
565
566
567
568
569
570
571

572
573
574
575
576
577
578
567
568
569
570
571
572
573

574
575
576
577
578
579
580
581







-
+







    unsorted_port_list, port_list
    if n_unsorted_ports==0
      mtt_error(['Component ', comp_name, ' (', comp_type, ') has no labeled ports'], errorfile); 
    end;
    %Write out the signed bond list in the correct order
unsorted_port_list
for j = 1:n_comp_bonds
      j
  j
      name_k = unsorted_port_list(j,:)
      k = name_in_list(name_k, port_list);
      % Check that it only appears once in port list
      if length(k)>1
	mtt_error(['Component ', comp_name, ' (', comp_type, ') has ports with the same name:  ', name_k], errorfile); 
      end;
      
586
587
588
589
590
591
592











593
594
595
596
597
598
599
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613







+
+
+
+
+
+
+
+
+
+
+







	mtt_error(['Component ', comp_name, ' (', comp_type, ') has an unrecognised port: ', name_k], errorfile); 
      else
	components(i,k) = signed_bond_list(j);     
      end;
    end;
  end;
end;



















MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]