Xilinx UG129 Answering Machine User Manual


 
PicoBlaze 8-bit Embedded Microcontroller www.xilinx.com 105
UG129 (v1.1.2) June 24, 2008
RESET Event
R
RESET Event
The reset event is not an instruction but the response of the PicoBlaze microcontroller
when the RESET input is High. A RESET Event restarts the PicoBlaze microcontroller and
clears various hardware elements, as shown in Table C-3.
A RESET Event is automatically generated immediately following FPGA configuration,
initiated by the FPGA’s internal Global Set/Reset (GSR) signal. After configuration, the
FPGA application generates RESET Event by asserting the RESET input before a rising
CLK clock edge.
The general-purpose registers, the scratchpad RAM, and the program store are not affected
by a RESET Event. The CALL/RETURN stack is a circular buffer, although a RESET Event
essentially resets the CALL/RETURN stack pointer.
Pseudocode
if (RESET input = High) then
; clear Program Counter
PC Å 0
; disable the INTERRUPT input by clearing the INTERRUPT_ENABLE flag
INTERRUPT_INPUT Å 0
; clear the ZERO and CARRY flags
ZERO Å 0
CARRY Å 0
endif
Registers/Flags Altered
Registers: PC, CALL/RETURN stack
Flags: CARRY, ZERO, INTERRUPT_ENABLE
Table C-3: PicoBlaze Reset Values
Resource RESET Event Effect
General-purpose Registers Unaffected.
Program Counter 0
ZERO Flag 0
CARRY Flag 0
INTERRUPT_ENABLE Flag 0
Scratchpad RAM Unaffected.
Program Store Unaffected.
CALL/RETURN Stack Stack Pointer reset.