Title Lab10 Pattern pds Revision 1 Author Hitoshi Oi
All Rights Reserved Company Univ of South Florida Date 11/21/95 CHIP lab9 INTEL_ARCH ; pin assignments PIN CLK ; clock pin pin r ; pin l ; pin hzd ; PIN Q0 ; LSB PIN Q1 PIN Q2 ; MSB PIN ra pin rb pin rc pin la pin lb pin lc ; Boolean equations for registers EQUATIONS ra = r1 + r2 + r3 + hazard rb = r2 + r3 + hazard rc = r3 + hazard la = l1 + l2 + l3 + hazard lb = l2 + l3 + hazard lc = l3 + hazard Q0.CLKF = CLK Q1.CLKF = CLK Q2.CLKF = CLK STATE MOORE_MACHINE DEFAULT_BRANCH neutral ; State Assignment neutral = /Q0 * /Q1 * /Q2 r1 = Q0 * /Q1 * /Q2 r2 = /Q0 * Q1 * /Q2 r3 = Q0 * Q1 * /Q2 l1 = /Q0 * /Q1 * Q2 l2 = Q0 * /Q1 * Q2 l3 = /Q0 * Q1 * Q2 hazard = Q0 * Q1 * Q2 ; State Transition neutral := RIGHT -> r1 + LEFT -> l1 + H_ON -> hazard r1 := RIGHT -> r2 r2 := RIGHT -> r3 r3 := VCC -> neutral l1 := LEFT -> l2 l2 := LEFT -> l3 l3 := VCC -> neutral hazard := VCC -> neutral CONDITIONS RIGHT = r * /l * /hzd LEFT = /r * l * /hzd H_ON = hzd SIMULATION ; set up vector and trace ; set to known state, preload registers (all low) VECTOR R_LIGHTS := [ra, rb, rc] VECTOR L_LIGHTS := [la, lb, lc] TRACE_ON r l hzd CLK ra rb rc SETF /CLK /r /l /hzd PRLDF /Q0 /Q1 /Q2 ; clock set before ; preload command SETF r FOR I := 0 to 5 DO BEGIN CLOCKF CLK END ;Make Right Turn SETF /r l FOR I := 0 to 5 DO BEGIN CLOCKF CLK END ;Make Left Turn SETF /l hzd FOR I := 0 to 5 DO BEGIN CLOCKF CLK END ;Hazard light TRACE_OFF ; end of simulation