jmce.sim.memory
Class MemoryBits
java.lang.Object
jmce.sim.memory.MemoryBits
- Direct Known Subclasses:
- MemoryBit
public class MemoryBits
- extends java.lang.Object
Map a portion of one memorty location.
This class map a portion of m emory location and permiot to read and
write only the selected bit.
- Version:
- 1.00
- Author:
- Mario Viara
Field Summary |
protected int |
mask
|
protected int |
shift
|
Constructor Summary |
MemoryBits(Memory memory,
int address,
int shift,
int width)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mask
protected int mask
shift
protected int shift
MemoryBits
public MemoryBits(Memory memory,
int address,
int shift,
int width)
getWidth
public int getWidth()
getBits
public int getBits()
throws SIMException
- Throws:
SIMException
setBits
public void setBits(int v)
throws SIMException
- Throws:
SIMException
addMemoryWriteListener
public void addMemoryWriteListener(MemoryWriteListener l)