home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s078 / 1.img / COUNT8.PLD < prev    next >
Encoding:
CUPL PLD Program format  |  1991-12-08  |  2.5 KB  |  76 lines

  1. Name      Count8;
  2. Partno      CA0008;
  3. Date      7/19/84 ;
  4. Revision  01;
  5. Designer  Kahl;
  6. Company   Assisted Technology;
  7. Assembly  None;
  8. Location  None;
  9.  
  10. /****************************************************************/
  11. /*                                */
  12. /* Octal Counter (74LS461)                    */
  13. /*                                 */
  14. /* 8-bit synchronous counter with parallel load, clear, and    */
  15. /* hold capability.  The LOAD operation loads the inputs    */
  16. /* (D7-D0) into the output register (Q7-Q0).  The CLEAR        */
  17. /* operation resets the output register to all LOWs.  The HOLD    */
  18. /* operation holds the previous value regardless of clock    */
  19. /* transitions.  The increment function adds one to the output    */
  20. /* register when the CARRY-IN is true (!ci=LO), otherwise the    */
  21. /* operation is a hold.  The CARRY-OUT is true (!co=LO) when    */
  22. /* the output register (Q7-Q0) is all HIGHs, otherwise false    */
  23. /* (!co=HI).                            */
  24. /****************************************************************/
  25. /** Allowable Target Device Types :  PAL20X8                   */
  26. /****************************************************************/
  27.  
  28. /**  Inputs  **/
  29.  
  30. PIN 1        = clock ;         /* Register Clock         */
  31. PIN [2,11]   = [instr0..1] ;     /* Instruction Type Inputs     */
  32. PIN [3..10]  = [D0..7] ;    /* Data Inputs            */
  33. PIN 13         = !out_enable ;    /* Register Output Enable    */
  34. PIN 23       = !carry_in ;     /* Carry-In Input         */
  35.  
  36. /**  Outputs  **/
  37.  
  38. PIN 14       = !carry_out ;    /* Carry-Out Output        */
  39. PIN [15..22] = [Q7..0] ;     /* Register Outputs        */
  40.  
  41. /** Declarations and Intermediate Variable Definitions **/
  42.  
  43. field instruction = [instr1..0];/* Instruction Field        */
  44. clear = instruction:0 ;        /* Operation Types        */
  45. hold  = instruction:1 ;
  46. load  = instruction:2 ;
  47. count = instruction:3 ;
  48.  
  49. /** Logic Equations **/
  50.  
  51. carry_out = carry_in & [Q0..7]:& ;
  52.  
  53. !Q0.d = clear # (count # hold) & !Q0
  54.       $ load & !D0 # count & carry_in ;
  55.  
  56. !Q1.d = clear # (count # hold) & !Q1
  57.       $ load & !D1 # count & carry_in & Q0 ;
  58.  
  59. !Q2.d = clear # (count # hold) & !Q2
  60.       $ load & !D2 # count & carry_in & [Q0..1]:& ; 
  61.  
  62. !Q3.d = clear # (count # hold) & !Q3
  63.       $ load & !D3 # count & carry_in & [Q0..2]:& ;
  64.  
  65. !Q4.d = clear # (count # hold) & !Q4
  66.       $ load & !D4 # count & carry_in & [Q0..3]:& ;
  67.  
  68. !Q5.d = clear # (count # hold) & !Q5
  69.       $ load & !D5 # count & carry_in & [Q0..4]:& ;
  70.  
  71. !Q6.d = clear # (count # hold) & !Q6
  72.       $ load & !D6 # count & carry_in & [Q0..5]:& ;
  73.  
  74. !Q7.d = clear # (count # hold) & !Q7
  75.       $ load & !D7 # count & carry_in & [Q0..6]:& ;
  76.