home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s078 / 1.img / COUNT13.PLD < prev    next >
Encoding:
Text File  |  1991-12-08  |  3.3 KB  |  115 lines

  1. Name      Count13;
  2. Partno      CA0013;
  3. Date      11/27/84;
  4. Rev      01;
  5. Designer  Kahl;
  6. Company   Assisted Technology;
  7. Assembly  None;
  8. Location  None;
  9.  
  10. /****************************************************************/
  11. /*                                */
  12. /* Thirteen Bit Counter                     */
  13. /*                                */
  14. /* 13-bit synchronous counter with parallel load, clear, and    */
  15. /* hold capability.  The LOAD operation loads the inputs    */
  16. /* (D12-D0) into the output register (Q12-Q0).    The HOLD    */
  17. /* operation holds the previous value regardless of clock    */
  18. /* transitions.  The CARRY is true (co=HI) when the output    */
  19. /* register (Q12-Q0) is all HIGHs, otherwise false (co=LO).    */
  20. /* The HALF-CARRY is true (hc=HI) when the all but the most    */
  21. /* significant output register (Q11-Q0) is all HIGHs, otherwise */
  22. /* false (hc=LO).                        */
  23. /****************************************************************/
  24. /** Allowable Target Device Types :  PAL32R16            */
  25. /****************************************************************/
  26.  
  27. /**  Inputs  **/
  28.  
  29. pin [16,36]    = [clk1,clk2];    /* Register Clocks        */
  30. pin [15,35]    = ![pl1,pl2];    /* Register Preload Pins    */
  31. pin [25,5]    = ![oe1,oe2];    /* Register Output Enables    */
  32. pin [32..34]    = [instr0..2];    /* Instruction Type Inputs    */
  33. pin [6..9,11..14,26..29,31] = [D0..12]; /* Data Inputs        */
  34.  
  35. /**  Outputs  **/
  36.  
  37. pin 24        = so;        /* Something Output        */
  38. pin 38        = carry;    /* Carry Output         */
  39. pin 40        = half_carry;    /* Half Carry Output (Q0-11)    */
  40. pin [1,3,17,19,21,23,22,20,18,4,2,37,39] = [Q0..12];
  41.  
  42. /** Declarations and Intermediate Variable Definitions **/
  43.  
  44. field instruction = [instr2..0];/* Instruction Field        */
  45. count = instruction:4;
  46. hold  = instruction:5;        /* Operation Types        */
  47. load  = instruction:6;
  48. field Q = [Q12..0];
  49. field D = [D12..0];
  50. $define BIT0  'h'1
  51. $define BIT1  'h'2
  52. $define BIT2  'h'4
  53. $define BIT3  'h'8
  54. $define BIT4  'h'10
  55. $define BIT5  'h'20
  56. $define BIT6  'h'40
  57. $define BIT7  'h'80
  58. $define BIT8  'h'100
  59. $define BIT9  'h'200
  60. $define BIT10 'h'400
  61. $define BIT11 'h'800
  62. $define BIT12 'h'1000
  63. field output = [Q0..2];
  64.  
  65. /** Logic Equations **/
  66.  
  67. carry.d = count & [Q0..12]:& ;
  68.  
  69. half_carry.d = count & [Q0..11]:& ;
  70.  
  71. so.d = D0 & output:0 # D1 & output:1 
  72.      # D2 & output:2 # D3 & output:3
  73.      # D4 & output:4 # D5 & output:5 
  74.      # D6 & output:6 # D7 & output:7;
  75.  
  76. Q.d  = load  & (BIT0  & D0
  77.          #    BIT1  & D1
  78.          #    BIT2  & D2
  79.          #    BIT3  & D3
  80.          #    BIT4  & D4
  81.          #    BIT5  & D5
  82.          #    BIT6  & D6
  83.          #    BIT7  & D7
  84.          #    BIT8  & D8
  85.          #    BIT9  & D9
  86.          #    BIT10 & D10
  87.          #    BIT11 & D11
  88.          #    BIT12 & D12)
  89.      # hold  & (BIT0  & Q0
  90.          #    BIT1  & Q1
  91.          #    BIT2  & Q2
  92.          #    BIT3  & Q3
  93.          #    BIT4  & Q4
  94.          #    BIT5  & Q5
  95.          #    BIT6  & Q6
  96.          #    BIT7  & Q7
  97.          #    BIT8  & Q8
  98.          #    BIT9  & Q9
  99.          #    BIT10 & Q10
  100.          #    BIT11 & Q11
  101.          #    BIT12 & Q12)
  102.      # count & (BIT0  & (Q0  $ 'b'1)
  103.          #    BIT1  & (Q1  $    Q0)
  104.          #    BIT2  & (Q2  $ [Q0..1]:&)
  105.          #    BIT3  & (Q3  $ [Q0..2]:&)
  106.          #    BIT4  & (Q4  $ [Q0..3]:&)
  107.          #    BIT5  & (Q5  $ [Q0..4]:&)
  108.          #    BIT6  & (Q6  $ [Q0..5]:&)
  109.          #    BIT7  & (Q7  $ [Q0..6]:&)
  110.          #    BIT8  & (Q8  $ [Q0..7]:&)
  111.          #    BIT9  & (Q9  $ [Q0..8]:&)
  112.          #    BIT10 & (Q10 $ [Q0..9]:&)
  113.          #    BIT11 & (Q11 $ [Q0..10]:&)
  114.          #    BIT12 & (Q12 $ [Q0..11]:&));
  115.