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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [shutdown.c] - Rev 246

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

/*
 * shutdown.c -- shutdown device
 */
 
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#include "common.h"
#include "console.h"
#include "error.h"
#include "cpu.h"
#include "mmu.h"
#include "memory.h"
#include "timer.h"
#include "dspkbd.h"
#include "serial.h"
#include "disk.h"
#include "output.h"
#include "shutdown.h"
#include "graph.h"
 
 
Word shutdownRead(Word addr) {
  /* the shutdown device always returns 0 on read */
  return 0;
}
 
 
void shutdownWrite(Word addr, Word data) {
  /* the device supports a single function: exiting the simulator */
  cpuExit();
  mmuExit();
  memoryExit();
  timerExit();
  displayExit();
  keyboardExit();
  serialExit();
  diskExit();
  outputExit();
  shutdownExit();
  graphExit();
  cPrintf("ECO32 Simulator shutdown\n");
  cExit();
  exit(data & 0xFF);
}
 
 
void shutdownReset(void) {
  cPrintf("Resetting Shutdown Device...\n");
}
 
 
void shutdownInit(void) {
  shutdownReset();
}
 
 
void shutdownExit(void) {
}
 

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

powered by: WebSVN 2.1.0

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