home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s205 / 1.ddi / BACKUP.001 / EXAMPLES_TUTOR6.PDS < prev    next >
Encoding:
PALASM Design Description  |  1991-02-27  |  3.3 KB  |  81 lines

  1. ;PALASM Design Description
  2.  
  3. ;---------------------------------- Declaration Segment ------------
  4. TITLE    TUTOR6.PDS
  5. PATTERN  A
  6. REVISION 1.0
  7. AUTHOR   J.ENGINEER
  8. COMPANY  ADVANCED MICRO DEVICES, INC.
  9. DATE     01/01/90
  10.  
  11. CHIP  TEMP  PALCE26V12
  12.  
  13. ;---------------------------------- PIN Declarations ---------------
  14. PIN  1          CLOCK                COMBINATORIAL             ; INPUT
  15. PIN  2          POWER                COMBINATORIAL             ; INPUT
  16. PIN  3          TEMP[1]              COMBINATORIAL             ; INPUT
  17. PIN  4          TEMP[2]              COMBINATORIAL             ; INPUT
  18. PIN  5          TEMP[3]              COMBINATORIAL             ; INPUT
  19. PIN  6          TEMP[4]              COMBINATORIAL             ; INPUT
  20. PIN  7          VCC                                            ; INPUT
  21. PIN  15         OFF                  REGISTERED                ; OUTPUT
  22. PIN  16         NORMAL               REGISTERED                ; OUTPUT
  23. PIN  17         ALARM                REGISTERED                ; OUTPUT
  24. PIN  21         GND                                            ; INPUT
  25.  
  26. ;----------------------------------- Boolean Equation Segment ------
  27. EQUATIONS
  28.  
  29. IF POWER = 0 THEN
  30.   BEGIN
  31.     OFF =      1
  32.     NORMAL =   0 ;This line is a change from the tutorial. See release notes.
  33.     ALARM =    0 ;This line is a change from the tutorial. See release notes.
  34.   END
  35. ELSE
  36.   BEGIN
  37.     OFF =      0 ;This line is a change from the tutorial. See release notes.
  38.     NORMAL =  /TEMP[1] *  TEMP[2] * /TEMP[3] * /TEMP[4] +
  39.               /TEMP[1] *  TEMP[2] * /TEMP[3] *  TEMP[4] +
  40.               /TEMP[1] *  TEMP[2] *  TEMP[3] * /TEMP[4] +
  41.               /TEMP[1] *  TEMP[2] *  TEMP[3] *  TEMP[4] +
  42.                TEMP[1] * /TEMP[2] * /TEMP[3] * /TEMP[4]
  43.     ALARM =   /TEMP[1] * /TEMP[2] * /TEMP[3] * /TEMP[4] +
  44.               /TEMP[1] * /TEMP[2] * /TEMP[3] *  TEMP[4] +
  45.               /TEMP[1] * /TEMP[2] *  TEMP[3] * /TEMP[4] +
  46.               /TEMP[1] * /TEMP[2] *  TEMP[3] *  TEMP[4] +
  47.                TEMP[1] * /TEMP[2] * /TEMP[3] *  TEMP[4] +
  48.                TEMP[1] * /TEMP[2] *  TEMP[3] * /TEMP[4] +
  49.                TEMP[1] * /TEMP[2] *  TEMP[3] *  TEMP[4] +
  50.                TEMP[1] *  TEMP[2] * /TEMP[3] * /TEMP[4] +
  51.                TEMP[1] *  TEMP[2] * /TEMP[3] *  TEMP[4] +
  52.                TEMP[1] *  TEMP[2] *  TEMP[3] * /TEMP[4] +
  53.                TEMP[1] *  TEMP[2] *  TEMP[3] *  TEMP[4]
  54.   END
  55.  
  56. ;----------------------------------- Simulation Segment ------------
  57. SIMULATION
  58.  
  59. TRACE_ON   POWER  TEMP[1]  TEMP[2]  TEMP[3]  TEMP[4]  OFF  NORMAL  ALARM
  60.  
  61. SETF      /POWER /TEMP[1] /TEMP[2] /TEMP[3] /TEMP[4]
  62.                 ; significance of settings:
  63.                 ; freezer power is off
  64.                 ; temperature reading is 0000
  65.                 ; temperature is immaterial if power is off
  66. CLOCKF   CLOCK
  67. CHECK   /ALARM   OFF  /NORMAL
  68. SETF     POWER     ; freezer power is back on -- look for alarm ON next clk
  69. CLOCKF   CLOCK
  70. CHECK    ALARM  /OFF  /NORMAL
  71. SETF     TEMP[2]    ; temperature = four -- look for alarm OFF next clk
  72. CLOCKF   CLOCK
  73. CHECK   /ALARM  /OFF   NORMAL
  74. SETF     TEMP[1]    ; temperature = 12 -- look for alarm ON next clock
  75. CLOCKF   CLOCK
  76. CHECK    ALARM  /OFF  /NORMAL
  77.  
  78. TRACE_OFF
  79. ;-------------------------------------------------------------------
  80.  
  81.