CAC 2016-08-11

port expander

./bound_hc_reconfig.s.archive/start_cpu.pl1:   02/05/79 by B. Greenberg for port expanders.
./bound_hc_reconfig.s.archive/start_cpu.pl1:         if pdata.expanded_port then do;            /* Update port expander bits */

./bound_hc_reconfig.s.archive/stop_cpu.pl1:   modified 02/05/79 by BSG for port expanders

./bound_hc_reconfig.s.archive/add_scu.pl1:/* Modified 5/79 by BSG for 8cpu port expander */

./bound_temp_1.s.archive/scas_init.pl1:   Modified 2/79 by Bernard S. Greenberg for port expanders/8 cpus.

./bound_active_1.s.archive/init_scu.pl1:   *    Modified sometime, BSG, for 8 cpu port expander.

./bound_wired_1.s.archive/scr_util.pl1:   modified 2/5/79 by B. Greenberg for port expanders.

./bound_page_control.s.archive/page_fault.alm:" Modified by B. Greenberg 2/79 for 8-cpu port expander

./bound_hc_data_wired.s.archive/scs.cds:   Modified 2/79 by BSG for 8-cpu port expander

expanded_ports:

   ./bound_temp_1.s.archive/scas_init.pl1:                 if ^scs$expanded_ports (cport)
   ./bound_temp_1.s.archive/scas_init.pl1:      scs$expanded_ports (cport) = "1"b;
   ./bound_temp_1.s.archive/scas_init.pl1: else if scs$expanded_ports (cport)
   ./bound_active_1.s.archive/init_scu.pl1:        if (cdata.type < "0010"b) & (string (scs$expanded_ports) ^= ""b) then
   ./bound_hc_data_wired.s.archive/scs.cds:      2 expanded_ports bit (1) unaligned dim (0:7),     /* Which ports have expanders */

expander_port:
   start_cpu.pl1, stop_cpu.pl1, scas_init.pl1, scr_util.pl1

scs.cds:

    dcl 1 scs aligned,                                          /* Information about system controllers */
            2 expanded_ports bit (1) unaligned dim (0:7),         /* Which ports have expanders */

scas_init.pl1:
          if cpu_card.expander_port ^= -1 then do;          /* Expander port */
               exp_port = cpu_card.expander_port - 1;       /* Get the subport #. */
               if (exp_port < 0 | exp_port > 3)
               then call syserr (CRASH, "scas_init: Illegal expander subport tag on CPU ^a config card.",
                         tag_letter (tag));
               if tag = scs$bos_processor_tag
               then call syserr (CRASH, "scas_init: Bootload CPU may not be on an expander port.");
               scs$cow (tag).expander_port = exp_port;      /*  Set necessary flags */
               scs$cow (tag).expanded_port = "1"b;
               scs$cow (tag).expander_command = "0"b3;      /* Set connect command */
               pdata.expanded_port = "1"b;
               scs$expanded_ports (cport) = "1"b;
               pdata.expander_port = exp_port;

./bound_wired_1.s.archive/scr_util.pl1

update_export_xipmsk:
          entry (port);                                     /* Update port-expander XIP masks */

dcl 1 rcow based (addr (scs$reconfig_general_cow)) aligned like scs$reconfig_general_cow;

          unspec (rcow) = ""b;                              /* Zero the cow. */
          do i = 0 to 7;
               pdp = addr (scs$processor_data (i));         /* Address proc data element */
               if pdata.expanded_port & pdata.controller_port = port
                    then substr (rcow.sub_mask, pdata.expander_port + 1, 1) =  pdata.interrupt_cpu;
          end;
          rcow.expander_command = "2"b3;                    /* Set XIP register */
          rcow.controller_port = port;
          call privileged_mode_ut$cioc (addr (rcow.cow));   /* We rely on this living in the bootload controller */
          return;

set_export_enable:
          entry (port, subport, enable_sw);

dcl  subport fixed bin (3);

          unspec (rcow) = ""b;                              /* Clear out sutff */
          do i = 0 to 7;                                    /* Scan CPU's */
               pdp = addr (scs$processor_data (i));
               if pdata.expanded_port & pdata.controller_port = port
                    then if pdata.expander_port = subport
                         then substr (rcow.sub_mask, pdata.expander_port + 1, 1) = enable_sw;
                         else substr (rcow.sub_mask, pdata.expander_port + 1, 1) = pdata.online;
         end;
          substr (rcow.sub_mask, 5, 1) = "1"b;              /* T. Ohlin wants exerciser bit on. */
         rcow.expander_command = "1"b3;                     /* Set subport enables */
         rcow.controller_port = port;
         call privileged_mode_ut$cioc (addr (rcow.cow));    /* Zap the bootload SCU */
/* The enables on all the other SCU's will be left enabled */
         return;

scs.incl.pl1:

dcl  1 scs$cow (0:7) aligned external,                      /* Actual connect words */
       2 pad bit (36) aligned,                              /* Expander COW's must be odd-word */
       2 cow,
         3 sub_mask bit (8) unaligned,                      /* Expander sub-port mask */
         3 mbz1 bit (13) unaligned,
         3 expander_command bit (3) unaligned,              /* Expander command. */
         3 mbz2 bit (2) unaligned,
         3 expanded_port bit (1) unaligned,                 /* "1"b = on expanded port */
         3 expander_port fixed bin (3) unsigned unaligned,  /* Port on expander for cioc */
         3 mbz3 bit (3) unaligned,
         3 controller_port fixed bin (3) unaligned unsigned;/* controller port for this CPU */

dcl  1 scs$cow_ptrs (0:7) external aligned,                 /* Pointers to COW's */
       2 rel_cow_ptr bit (18) unal,                         /* Relative pointer to COW */
       2 pad bit (12) unal,
       2 tag bit (6) unal;                                  /* Better be zero. */

dcl  1 scs$reconfig_general_cow aligned external,           /* Used during reconfig ops. */
       2 pad bit (36) aligned,
       2 cow,                                               /* Connect operand word, in odd location. */
         3 sub_mask bit (8) unaligned,                      /* Expander sub-port mask */
         3 mbz1 bit (13) unaligned,
         3 expander_command bit (3) unaligned,              /* Expander command. */
         3 mbz2 bit (9) unaligned,
         3 controller_port fixed bin (3) unaligned unsigned;/* controller port for this CPU */

Interesting globals:

    dcl  scs$expanded_ports bit (1) unaligned dim (0:7) external;
                                                            /* Which ports have expanders */

   dcl  1 scs$processor_data (0:7) aligned ext,                /* information about CPUs in the system */
       2 expanded_port bit (1),                             /* "1"b = on expanded port */
       2 expander_port fixed bin (2) unsigned,              /* The actual expander port */
       2 controller_port fixed bin (3) unsigned /* Port on controller */

   dcl  1 scs$port_data (0:7) aligned external static,         /* Info about what is connected to each SCU port */
       2 expander_port bit (1) unaligned,                   /* "1"b => this port has a port expander */
       2 expanded_cpu (0:3) bit (1) unaligned,              /* "1"b => this expander port has a CPU attached */
       2 cpu_number (0:3) fixed bin (3) unsigned unaligned, /* CPU number of CPU(s) attached to this port */
                                                            /* cpu_number (0) is only one if expander_port is "0"b */

expander_command:

   ./bound_temp_1.s.archive/scas_init.pl1:      scs$cow (tag).expander_command = "0"b3;    /* Set connect command */
   ./bound_wired_1.s.archive/scr_util.pl1: rcow.expander_command = "2"b3;          /* Set XIP register */
   ./bound_wired_1.s.archive/scr_util.pl1:         rcow.expander_command = "1"b3;                  /* Set subport enables */

"Set connect command": scas_init initalizes a per-cpu cow; presumably the connect code uses the cow for any connect commands.

I'll need to create a port expander device for the cable command....

cpu -tag a -port 7 -state on -type dps8 -model 70. -cache 8. 
cpu -tag b -port 6 -state off -type dps8 -model 70. -cache 8. -exp_port a 
cpu -tag c -port 6 -state off -type dps8 -model 70. -cache 8. -exp_port b 
cpu -tag d -port 6 -state off -type dps8 -model 70. -cache 8. -exp_port c 
cpu -tag e -port 6 -state off -type dps8 -model 70. -cache 8. -exp_port d 
cpu -tag f -port 5 -state off -type dps8 -model 70. -cache 8. -exp_port a
cpu -tag g -port 5 -state off -type dps8 -model 70. -cache 8. -exp_port b
cpu -tag h -port 5 -state off -type dps8 -model 70. -cache 8. -exp_port c
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License