home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p070 / 8.ddi / TUTOR.PLB / PROCEDUR.PLD < prev    next >
Encoding:
Text File  |  1990-12-11  |  1.3 KB  |  35 lines

  1.                 PROCEDURE EXAMPLE (WITHOUT A RESET SIGNAL)
  2.  
  3. Some devices, including specialized PROMs and devices with reset built in
  4. (such as the PAL22V10 built in asynchronous reset product term), do not
  5. need the reset signal on the PROCEDURE statement.  The design below
  6. illustrates a simple state machine that uses the asynchronous reset on the
  7. 22V10 rather than an explicit reset signal in the procedure.
  8.  
  9. The miser bits are set using the configuration statement.  If the miser
  10. bits are left unprogrammed, unpredictable results may occur.
  11.  
  12. |EP320 in:(IN[3..0],ENA,RESET),  io:(Q[1..0]),  clock:CLK
  13. |
  14. | Conditioning:   ENA ?? dff(Q[1..0],CLK,RESET)
  15. | Configuration:  "Miser:1"
  16. |
  17. | Procedure: Q[1..0]
  18. | {
  19. |   S0.  IN0' ? -> S0
  20. |   S1.  IN1' ? -> S1
  21. |   S2.  IN2' ? -> S2
  22. |   S3.  IN3' ? -> S3
  23. |               -> S0
  24. | }
  25.  
  26. | Vectors:
  27. | { Display (CLK)c," ENA:",ENA,"  RESET:",RESET, \
  28. |                  "  INPUTS:",IN[3..0],"  STATE:",(Q[1..0])d
  29. |   Test ENA=1;RESET=0;CLK             |Q[3..0] should be undefined
  30. |   Test RESET=1,0                     |Asynchronously reset the machine
  31. |   Test IN[3..0]=0,1,2,4,8;CLK=2(0,1) |Increment through the states
  32. |   End
  33. | }
  34.  
  35.