Program Ex4_6 (input,output);

Const
   %include 'ilap:nmos.consts'
   ac=6;ab=3;bc=4;cd=2;da=4;
   ya=0;xb=120;yc=80;xd=0;

Type
   %include 'ilap:nmos.types'

Var
   a : array [1..da+ac+ab] of port;
   b : array [1..ab+bc]    of port;
   c : array [1..cd+ac+bc] of port;
   d : array [1..da+cd]    of port;
   i,j,k,l: integer;

%include 'ilap:nmos.specs'

Begin
   Initialise ('sroute');

   for i := 1 to da+ac+ab do begin
      a[i].x := 8*i;
      a[i].w := 4;
   end;
   for i := 1 to ab+bc do begin
      b[i].x := 7*i;
      b[i].w := 3;
   end;
   for i := 1 to cd+ac+bc do begin
      c[i].x := 8*i;
      c[i].w := 3 ;
   end;
   for i := 1 to da+cd do begin
      d[i].x := 12*i;
      d[i].w := 4;
   end;

   sroute ('side route',a,b,c,d,ac,ab,bc,cd,da,ya,xb,yc,xd,metal,3,3);

   symbol('side route demo');
     draw('side route', 0, 0);
     for i := 1 to da+ac+ab do pm(a[i].x+2, ya+1);
     for i := 1 to ab+bc do dm(xb-1, b[i].x+1) ;
     for i := 1 to cd+ac+bc do pm(c[i].x+1, yc-1) ;
     for i := 1 to da+cd do dm(xd+1, d[i].x+2) ;
   endsymbol;

   Finish;
End.
