URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 138 |
Rev 167 |
Line 26... |
Line 26... |
#include <string.h>
|
#include <string.h>
|
|
|
#include "pic.h"
|
#include "pic.h"
|
#include "spr_defs.h"
|
#include "spr_defs.h"
|
#include "except.h"
|
#include "except.h"
|
|
#include "sprs.h"
|
|
|
extern int cont_run;
|
extern int cont_run;
|
|
|
/* Reset. It initializes PIC registers. */
|
/* Reset. It initializes PIC registers. */
|
void pic_reset()
|
void pic_reset()
|
Line 56... |
Line 57... |
except_handle(EXCEPT_HPINT, 0);
|
except_handle(EXCEPT_HPINT, 0);
|
} else
|
} else
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR))
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR))
|
except_handle(EXCEPT_LPINT, 0);
|
except_handle(EXCEPT_LPINT, 0);
|
*/
|
*/
|
if ((picsr & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR)) {
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR)) {
|
if (picsr & picpr) {
|
picsr = mfspr(SPR_PICSR);
|
|
picpr = mfspr(SPR_PICPR);
|
|
if (picsr & picpr)
|
except_handle(EXCEPT_HPINT, 0);
|
except_handle(EXCEPT_HPINT, 0);
|
} else if(picsr) {
|
else if(picsr)
|
except_handle(EXCEPT_LPINT, 0);
|
except_handle(EXCEPT_LPINT, 0);
|
}
|
}
|
}
|
}
|
}
|
|
|
|
/* Asserts interrupt to the PIC. */
|
/* Asserts interrupt to the PIC. */
|
void report_interrupt(int line)
|
void report_interrupt(int line)
|
{
|
{
|
setsprbits(SPR_PMR, SPR_PMR_DME, 0); /* Disable doze mode */
|
setsprbits(SPR_PMR, SPR_PMR_DME, 0); /* Disable doze mode */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.