URL
https://opencores.org/ocsvn/eco32/eco32/trunk
[/] [eco32/] [trunk/] [sim/] [shutdown.c] - Diff between revs 25 and 246
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 25 |
Rev 246 |
/*
|
/*
|
* shutdown.c -- shutdown device
|
* shutdown.c -- shutdown device
|
*/
|
*/
|
|
|
|
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <string.h>
|
|
|
#include "common.h"
|
#include "common.h"
|
#include "console.h"
|
#include "console.h"
|
#include "error.h"
|
#include "error.h"
|
#include "cpu.h"
|
#include "cpu.h"
|
#include "mmu.h"
|
#include "mmu.h"
|
#include "memory.h"
|
#include "memory.h"
|
#include "timer.h"
|
#include "timer.h"
|
#include "dspkbd.h"
|
#include "dspkbd.h"
|
#include "term.h"
|
#include "serial.h"
|
#include "disk.h"
|
#include "disk.h"
|
#include "output.h"
|
#include "output.h"
|
#include "shutdown.h"
|
#include "shutdown.h"
|
#include "graph.h"
|
#include "graph.h"
|
|
|
|
|
Word shutdownRead(Word addr) {
|
Word shutdownRead(Word addr) {
|
/* the shutdown device always returns 0 on read */
|
/* the shutdown device always returns 0 on read */
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
void shutdownWrite(Word addr, Word data) {
|
void shutdownWrite(Word addr, Word data) {
|
/* the device supports a single function: exiting the simulator */
|
/* the device supports a single function: exiting the simulator */
|
cpuExit();
|
cpuExit();
|
mmuExit();
|
mmuExit();
|
memoryExit();
|
memoryExit();
|
timerExit();
|
timerExit();
|
displayExit();
|
displayExit();
|
keyboardExit();
|
keyboardExit();
|
termExit();
|
serialExit();
|
diskExit();
|
diskExit();
|
outputExit();
|
outputExit();
|
shutdownExit();
|
shutdownExit();
|
graphExit();
|
graphExit();
|
cPrintf("ECO32 Simulator shutdown\n");
|
cPrintf("ECO32 Simulator shutdown\n");
|
cExit();
|
cExit();
|
exit(data & 0xFF);
|
exit(data & 0xFF);
|
}
|
}
|
|
|
|
|
void shutdownReset(void) {
|
void shutdownReset(void) {
|
cPrintf("Resetting Shutdown Device...\n");
|
cPrintf("Resetting Shutdown Device...\n");
|
}
|
}
|
|
|
|
|
void shutdownInit(void) {
|
void shutdownInit(void) {
|
shutdownReset();
|
shutdownReset();
|
}
|
}
|
|
|
|
|
void shutdownExit(void) {
|
void shutdownExit(void) {
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.