/*
 * Jazz library for PamDC: PCI-Pamette pinout definitions.
 * Patrice Bertin <Patrice.Bertin@cma.ensmp.fr>
 * CMA-Paris, Ecole des Mines de Paris
 */

package jazz.circuit.pam;

/******************************************************************************
 *
 *                       PCI-Pamette V1 pinout lists.
 *
 *****************************************************************************/

/*
 * Common definitions.
 */

public class SBus0Pads {
  public x: int[2, 3];
  public static d: int[32] = [
    58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75,
    80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96
  ];
}

public class SBus1Pads {
  public x: int[2, 2];
  public static d: int[15] = [
    58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75
  ];
}

public class SRamPads {
  public static addr: int[15] = [
    201,199,197,195,192,190,188,186,180,178,176,174,172,169,167
  ];
  public static data: int[16] = [
    202,200,198,196,193,191,189,187,181,179,177,175,173,170,168,166
  ];
  public static _oe: int = 165;
  public static _write: int[2] = [185,184];
  public static _bank: int[2] = [164,163];
}

public class UsrLcaPads {
  public static clksys: int = 4;
  public static clkusr: int = 162;
  public static wbus: int[36] = [
    111,112,113,114,115,116,117,118,120,121,122,123,124,125,126,127,
    128,129,132,133,134,135,136,137,138,139,140,141,143,144,145,146,
    147,148,149,150
  ];
  public static ring: int[2] = [110,100];
}

/*
 * LCA0
 */

public class UsrLCA0Pads extends UsrLcaPads {
  public static sbus: SBus0Pads = new SBus0Pads(x = x) {
    x[0, 0..2] = [152,159, 97];
    x[1, 0..2] = [109,161, 98];
  }
  public static clksysx2: int = 57;
  public static ebus: int[36] = [
    45, 44, 43, 42, 41, 40, 39, 38, 36, 35, 34, 33, 32, 31, 30, 29,
    28, 27, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 13, 12, 11, 10,
     9,  8,  7,  6
  ];
  public static sram: SRamPads = new SRamPads();
}

/*
 * LCA1
 */

public class UsrLCA1Pads extends UsrLcaPads {
  public static sbus: SBus0Pads = new SBus0Pads(x = x) {
    x[0, 0..2] = [109,161, 97];
    x[1, 0..2] = [152,159, 98];
  }
  public static clksysx2: int = 57;
  public static ebus: int[36] = [
    45, 44, 43, 42, 41, 40, 39, 38, 36, 35, 34, 33, 32, 31, 30, 29,
    28, 27, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 13, 12, 11, 10,
     9,  8,  7,  6
  ];
  public static sram: SRamPads = new SRamPads();
}

/*
 * LCA2
 */

public class UsrLCA2Pads extends UsrLcaPads {
  public static sbus: SBus1Pads = new SBus1Pads(x = x) {
    x[0, 0..1] = [152,159];
    x[1, 0..1] = [109,161];
  }
}

/*
 * LCA3
 */

public class UsrLCA3Pads extends UsrLcaPads {
  public static sbus: SBus1Pads = new SBus1Pads(x = x) {
    x[0, 0..1] = [109,161];
    x[1, 0..1] = [152,159];
  }
}