URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 63 |
Rev 77 |
Line 31... |
Line 31... |
/* Set a specific SPR with a value. */
|
/* Set a specific SPR with a value. */
|
void mtspr(int regno, sprword value)
|
void mtspr(int regno, sprword value)
|
{
|
{
|
int ofs = regno % MAX_SPRS_PER_GRP;
|
int ofs = regno % MAX_SPRS_PER_GRP;
|
|
|
|
if (regno == 0x1234)
|
|
printf("MTSPR(0x1234, %x);\n", value);
|
|
|
regno /= MAX_SPRS_PER_GRP;
|
regno /= MAX_SPRS_PER_GRP;
|
regno += ofs;
|
regno += ofs;
|
|
|
/* printf("mtspr(%x, %x)\n", regno, value);
|
/* printf("mtspr(%x, %x)\n", regno, value);
|
*/ if (regno < MAX_SPRS)
|
*/ if (regno < MAX_SPRS)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.