OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [shutdown.c] - Blame information for rev 310

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 25 hellwig
/*
2
 * shutdown.c -- shutdown device
3
 */
4
 
5
 
6
#include <stdio.h>
7
#include <stdlib.h>
8
#include <string.h>
9
 
10
#include "common.h"
11
#include "console.h"
12
#include "error.h"
13
#include "cpu.h"
14 275 hellwig
#include "trace.h"
15 25 hellwig
#include "mmu.h"
16
#include "memory.h"
17
#include "timer.h"
18
#include "dspkbd.h"
19 246 hellwig
#include "serial.h"
20 25 hellwig
#include "disk.h"
21
#include "output.h"
22
#include "shutdown.h"
23
#include "graph.h"
24
 
25
 
26
Word shutdownRead(Word addr) {
27
  /* the shutdown device always returns 0 on read */
28
  return 0;
29
}
30
 
31
 
32
void shutdownWrite(Word addr, Word data) {
33
  /* the device supports a single function: exiting the simulator */
34
  cpuExit();
35 275 hellwig
  traceExit();
36 25 hellwig
  mmuExit();
37
  memoryExit();
38
  timerExit();
39
  displayExit();
40
  keyboardExit();
41 246 hellwig
  serialExit();
42 25 hellwig
  diskExit();
43
  outputExit();
44
  shutdownExit();
45
  graphExit();
46
  cPrintf("ECO32 Simulator shutdown\n");
47
  cExit();
48
  exit(data & 0xFF);
49
}
50
 
51
 
52
void shutdownReset(void) {
53
  cPrintf("Resetting Shutdown Device...\n");
54
}
55
 
56
 
57
void shutdownInit(void) {
58
  shutdownReset();
59
}
60
 
61
 
62
void shutdownExit(void) {
63
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.