Last change
on this file since 354 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
|
Rev | Line | |
---|
[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 */
|
---|
| 14 | boolean mem_busy;
|
---|
| 15 |
|
---|
| 16 | union memword_t {
|
---|
| 17 | byte byte[4];
|
---|
| 18 | halfword halfword[2];
|
---|
| 19 | word fullword;
|
---|
| 20 | };
|
---|
| 21 |
|
---|
| 22 | /* Control signal */
|
---|
| 23 | typedef enum {
|
---|
| 24 | MEM_STALLED,
|
---|
| 25 | READ,
|
---|
| 26 | WRITE_BYTE,
|
---|
| 27 | WRITE_HALFWORD,
|
---|
| 28 | WRITE_WORD
|
---|
| 29 | } mem_control_t;
|
---|
| 30 |
|
---|
| 31 | void readmem();
|
---|
| 32 | void writemem();
|
---|
| 33 | word 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.