Line 1... |
Line 1... |
/* int-test.S. Test of Or1ksim interrupt controller
|
/* int-test.S. Test of Or1ksim interrupt handling
|
|
|
Copyright (C) 1999-2006 OpenCores
|
Copyright (C) 1999-2006 OpenCores
|
Copyright (C) 2010 Embecosm Limited
|
Copyright (C) 2010 Embecosm Limited
|
|
|
Contributors various OpenCores participants
|
Contributors various OpenCores participants
|
Line 23... |
Line 23... |
|
|
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
This code is commented throughout for use with Doxygen.
|
This code is commented throughout for use with Doxygen.
|
--------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------*/
|
|
|
/* Within the test we'll use following global variables:
|
/* NOTE. This is not a test of the Programmable Interrupt Controller.
|
|
|
|
Within the test we'll use following global variables:
|
|
|
r16 interrupt counter
|
r16 interrupt counter
|
r17 current tick timer comparison counter
|
r17 current tick timer comparison counter
|
r18 sanity counter
|
r18 sanity counter
|
r19 loop counter
|
r19 loop counter
|
Line 36... |
Line 38... |
r23 RAM_START
|
r23 RAM_START
|
|
|
r25-r31 used by int handler
|
r25-r31 used by int handler
|
|
|
The test do the following:
|
The test do the following:
|
We set up the tick timer to trigger once and then we trigger interrupts incrementally
|
We set up the tick timer to trigger once and then we trigger interrupts
|
on every cycle in the specified test program; on interrupt handler we check if data computed
|
incrementally on every cycle in the specified test program; on interrupt
|
so far exactly matches precalculated values. If interrupt has returned incorreclty, we can
|
handler we check if data computed so far exactly matches precalculated
|
detect this using assertion routine at the end.
|
values. If interrupt has returned incorreclty, we can detect this using
|
|
assertion routine at the end.
|
*/
|
*/
|
|
|
#include "spr-defs.h"
|
#include "spr-defs.h"
|
#include "board.h"
|
#include "board.h"
|
|
|