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

Subversion Repositories eco32

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

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
#include "mmu.h"
15
#include "memory.h"
16
#include "timer.h"
17
#include "dspkbd.h"
18
#include "term.h"
19
#include "disk.h"
20
#include "output.h"
21
#include "shutdown.h"
22
#include "graph.h"
23
 
24
 
25
Word shutdownRead(Word addr) {
26
  /* the shutdown device always returns 0 on read */
27
  return 0;
28
}
29
 
30
 
31
void shutdownWrite(Word addr, Word data) {
32
  /* the device supports a single function: exiting the simulator */
33
  cpuExit();
34
  mmuExit();
35
  memoryExit();
36
  timerExit();
37
  displayExit();
38
  keyboardExit();
39
  termExit();
40
  diskExit();
41
  outputExit();
42
  shutdownExit();
43
  graphExit();
44
  cPrintf("ECO32 Simulator shutdown\n");
45
  cExit();
46
  exit(data & 0xFF);
47
}
48
 
49
 
50
void shutdownReset(void) {
51
  cPrintf("Resetting Shutdown Device...\n");
52
}
53
 
54
 
55
void shutdownInit(void) {
56
  shutdownReset();
57
}
58
 
59
 
60
void shutdownExit(void) {
61
}

powered by: WebSVN 2.1.0

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