source: liacs/ca/opdr2b/src/memory.h@ 136

Last change on this file since 136 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 644 bytes
RevLine 
[2]1/* Author : Rick van der Zwet
2 * S-number : 0433373
3 * Version : $Id: memory.h 363 2007-12-03 06:07:31Z rick $
4 * Copyright : FreeBSD Licence
5 * Description : Memory unit header
6 */
7
8#ifndef MEMORY_H
9#define MEMORY_H
10
11#include "sim.h"
12
13/* Signal */
14boolean mem_busy;
15
16union memword_t {
17 byte byte[4];
18 halfword halfword[2];
19 word fullword;
20};
21
22/* Control signal */
23typedef enum {
24 MEM_STALLED,
25 READ,
26 WRITE_BYTE,
27 WRITE_HALFWORD,
28 WRITE_WORD
29} mem_control_t;
30
31void readmem();
32void writemem();
33word mem_operation(const word address, const word value,
34 const mem_control_t action);
35#endif
Note: See TracBrowser for help on using the repository browser.