ELEC 464 : Microcomputer System Design Fall 1995 Assignment 6 - Solutions Question 1 The design can be simplified by breaking down the problem into a num- ber of smaller parts. In this case, part of the design is the detection of an I* *ACK cycle and part is detecting interrupt vectors less than 64. These can be com- bined into something that detects IACK cycles with bad exception vectors. The final part of the design can best be approached using a truth table: ________________________________________________ __badiackB_ERRIN__DTACKIN____BERROUT__DTACKOUT___ _ 0 _ 0 _ 0 _ _ 0 _ 0 _ _ 0 _ 0 _ 1 _ _ 0 _ 1 _ _ 0 _ 1 _ 0 _ _ 1 _ 0 _ _ 0 _ 1 _ 1 _ _ 1 _ 1 _ _ 1 _ 0 _ 0 _ _ 0 _ 0 _ _ 1 _ 0 _ 1 _ _ 1 _ 0 _ _ 1 _ 1 _ 0 _ _ 1 _ 0 _ _____1______1________1_________1__________0______ See the attached listings for the CUPL design. Question 2 See the attached program listings for the solution. Question 3 1. The vector at $020, privilege violation, is initialized to $500. The vector at $07C, level 7 autovector interrupt, is initialized to $500. The vector at $080, trap number 0, is initialized to $600. 2. The start-up code does not leave the CPU in supervisor mode because the S bit in SR is set to 0. 3. The SSP (A7 when in supervisor mode) has been set to $1000. 4. the interrupt mask has been set to $7. 5. The clock signal will cause an interrupt every second, only on the falling edge since level 7 interrupts are edge (not level) sensitive. 6. The level 7 autovector interrupt handler, at $500 will be executed. 7. The LS byte of what was in the pushed SR (the pushed CCR) will be writ- ten to the output port. This byte is composed of the bits corresponding to the 000X NZVC flags. This value will be $04 since the bits in the CCR were set by MOVE.W #$0704,SR and not changed by either MOVEA or BRA LOOP. 1