11.07.2015 Views

Nios II Processor Reference Handbook

Nios II Processor Reference Handbook

Nios II Processor Reference Handbook

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Instantiating the Core in SOPC BuilderRegister OptionsTable 8–1 shows the settings that affect the timer core’s registers.Table 8–1. Register OptionsOptionWriteableperiodReadablesnapshotStart/Stopcontrol bitsDescriptionWhen this option is enabled, a master peripheral can change the count-down period by writingperiodl and periodh. When disabled, the count-down period is fixed at the specifiedTimeout Period, and the periodl and periodh registers do not exist in hardware.When this option is enabled, a master peripheral can read a snapshot of the current countdown.When disabled, the status of the counter is detectable only via other indicators, such asthe status register or the IRQ signal. In this case, the snapl and snaph registers do notexist in hardware, and reading these registers produces an undefined value.When this option is enabled, a master peripheral can start and stop the timer by writing theSTART and STOP bits in the control register. When disabled, the timer runs continuously.When the System reset on timeout (watchdog) option is enabled, the START bit is alsopresent, regardless of the Start/Stop control bits option.Output Signal OptionsTable 8–2 shows the settings that affect the timer core’s output signals.Table 8–2. Output Signal OptionsOptionTimeout pulse (1clock wide)System reset ontimeout (watchdog)DescriptionWhen this option is enabled, the timer core outputs a signal timeout_pulse. This signalpulses high for one clock cycle whenever the timer reaches zero. When disabled, thetimeout_pulse signal does not exist.When this option is enabled, the timer core’s Avalon slave port includes theresetrequest signal. This signal pulses high for one clock cycle (causing a systemwidereset) whenever the timer reaches zero. When this option is enabled, the internaltimer is stopped at reset. Explicitly writing the START bit of the control register starts thetimer. When this option is disabled, the resetrequest signal does not exist.See “Configuring the Timer as a Watchdog Timer” on page 8–4.Configuring the Timer as a Watchdog TimerTo configure the timer for use as a watchdog, in the configuration wizardselect Watchdog in the Preset Configurations list, or choose the followingsettings:■■■Set the Timeout Period to the desired “watchdog” period.Turn off the Writeable period option.Turn off the Readable snapshot option.8–4 Altera Corporation<strong>Nios</strong> <strong>II</strong> <strong>Processor</strong> <strong>Reference</strong> <strong>Handbook</strong> September 2004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!