/* Author : Rick van der Zwet * S-number : 0433373 * Version : $Id: control.h 363 2007-12-03 06:07:31Z rick $ * Copyright : FreeBSD Licence * Description : Memory unit header */ #ifndef CONTROL_H #define CONTROL_H #include "sim.h" #include "alu.h" #include "memory.h" #include "imm.h" #include "constant.h" #include "datapath.h" typedef enum { NEXT, UNCOND, MEMBUSY, DECODE1, DECODE2, DECODE3, ZEROVALUE, NEGVALUE, RTYPEIR } control_cond_t; /* XXX: Not that effient, might be the use of bitfields */ typedef struct { address_t address; control_t control; control_cond_t cond; micro_address_t jump; } microcode_t; typedef struct { uint8_t ocode; uint8_t fcode; micro_address_t target; } decode_t; micro_address_t mpc; void set_signals(); void find_new_mPC(); void control_init(); #endif