jmce.sim.memory
Class OpenCollectorMemoryBit
java.lang.Object
jmce.sim.memory.MemoryBits
jmce.sim.memory.MemoryBit
jmce.sim.memory.OpenCollectorMemoryBit
- All Implemented Interfaces:
- MemoryReadListener
public class OpenCollectorMemoryBit
- extends MemoryBit
- implements MemoryReadListener
Memory bit open collector.
Memory bit shared between one cpu and one peripheral. This bit
operate as a 'Open Collector' circuit if the peripheral set the bit
to 0 the result will be 0 otherwise the result will be read from the
associated memory.
- Version:
- 1.00
- Author:
- Mario Viara
Method Summary |
boolean |
get()
|
int |
readMemory(Memory m,
int a,
int v)
Called when the memory is readed. |
void |
set(boolean v)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OpenCollectorMemoryBit
public OpenCollectorMemoryBit(Memory memory,
int a,
int b)
get
public boolean get()
throws SIMException
- Overrides:
get
in class MemoryBit
- Throws:
SIMException
set
public void set(boolean v)
throws SIMException
- Overrides:
set
in class MemoryBit
- Throws:
SIMException
readMemory
public int readMemory(Memory m,
int a,
int v)
- Description copied from interface:
MemoryReadListener
- Called when the memory is readed.
This is method is called to notify a read at the specified
memory loction.
- Specified by:
readMemory
in interface MemoryReadListener
- Parameters:
m
- - Memory readed.a
- - Address where the operation occours.v
- - Value readed from the phisical memory or
from previus installed listener.
- Returns:
- Value readed from the memory.