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

  1. ;PALASM Design Description
  2.  
  3. ;---------------------------------- Declaration Segment ------------
  4. TITLE    TUTOR7.PDS
  5. PATTERN  A
  6. REVISION 2.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..6       TEMP[1..4]           COMBINATORIAL             ; INPUT
  17. PIN  7          VCC                                            ; INPUT
  18. PIN  15         OFF                  REGISTERED                ; OUTPUT
  19. PIN  16         NORMAL               REGISTERED                ; OUTPUT
  20. PIN  17         ALARM                REGISTERED                ; OUTPUT
  21. PIN  21         GND                                            ; INPUT
  22.  
  23. ;----------------------------------- Boolean Equation Segment ------
  24. EQUATIONS
  25.  
  26. IF POWER = 0 THEN
  27.   BEGIN
  28.     OFF    = 1
  29.     ALARM  = 0 ;This line is a change from the tutorial. See release notes.
  30.     NORMAL = 0 ;This line is a change from the tutorial. See release notes.
  31.   END                           ; END IF STATEMENT
  32. ELSE
  33.   BEGIN
  34.     CASE ( TEMP[1..4] )
  35.       BEGIN
  36.         #d4..8:
  37.           BEGIN
  38.             NORMAL = 1
  39.             ALARM  = 0 ;This line is a change from the tutorial. See release notes.
  40.             OFF    = 0 ;This line is a change from the tutorial. See release notes.
  41.           END
  42.         OTHERWISE:
  43.           BEGIN
  44.             ALARM  = 1
  45.             NORMAL = 0 ;This line is a change from the tutorial. See release notes.
  46.             OFF    = 0 ;This line is a change from the tutorial. See release notes.
  47.           END                   ; END OTHERWISE STATEMENT
  48.       END                       ; END CASE STATEMENT
  49.   END                           ; END ELSE STATEMENT
  50.  
  51.  
  52. ;----------------------------------- Simulation Segment ------------
  53. SIMULATION
  54.  
  55. TRACE_ON   POWER  TEMP[1]  TEMP[2]  TEMP[3]  TEMP[4]  OFF  NORMAL  ALARM
  56.  
  57. SETF      /POWER /TEMP[1] /TEMP[2] /TEMP[3] /TEMP[4]
  58.                 ; significance of settings:
  59.                 ; freezer power is off
  60.                 ; temperature reading is 0000
  61.                 ; temperature is immaterial if power is off
  62. CLOCKF   CLOCK
  63. CHECK   /ALARM   OFF  /NORMAL
  64. SETF     POWER     ; freezer power is back on -- look for alarm ON next clk
  65. CLOCKF   CLOCK
  66. CHECK    ALARM  /OFF  /NORMAL
  67. SETF     TEMP[2]    ; temperature = four -- look for alarm OFF next clk
  68. CLOCKF   CLOCK
  69. CHECK   /ALARM  /OFF   NORMAL
  70. SETF     TEMP[1]    ; temperature = 12 -- look for alarm ON next clock
  71. CLOCKF   CLOCK
  72. CHECK    ALARM  /OFF  /NORMAL
  73.  
  74. TRACE_OFF
  75. ;-------------------------------------------------------------------
  76.