public static final class MmuSubsystem.Builder
extends java.lang.Object
Constructor and Description |
---|
MmuSubsystem.Builder() |
Modifier and Type | Method and Description |
---|---|
MmuSubsystem |
build() |
MmuAddressInstance |
getAddress(java.lang.String name) |
MmuBuffer |
getBuffer(java.lang.String name) |
void |
registerAction(MmuAction action)
Registers the action in the memory management unit.
|
void |
registerAddress(MmuAddressInstance address)
Registers the address type in the MMU.
|
void |
registerBuffer(MmuBuffer buffer)
Registers a buffer in the MMU.
|
void |
registerOperation(MmuOperation operation)
Registers an operation in the MMU.
|
void |
registerSegment(MmuSegment segment)
Registers a segment in the MMU.
|
void |
registerTransition(MmuTransition transition)
Registers the transition in the memory management unit.
|
void |
registerVariable(IntegerVariable variable) |
void |
registerVariable(MmuStruct struct) |
void |
setDataVariable(IntegerVariable variable) |
void |
setName(java.lang.String name) |
void |
setPhysicalAddress(MmuAddressInstance address) |
void |
setStartAction(MmuAction action)
Sets the initial (root) action of the memory management unit.
|
void |
setTargetBuffer(MmuBuffer buffer)
Sets the target buffer (the main memory device).
|
void |
setVirtualAddress(MmuAddressInstance address) |
public MmuSubsystem build()
public void setName(java.lang.String name)
public void registerVariable(IntegerVariable variable)
public void registerVariable(MmuStruct struct)
public void setDataVariable(IntegerVariable variable)
public void registerAddress(MmuAddressInstance address)
address
- the address to be registered.java.lang.IllegalArgumentException
- if address
is null
.public MmuAddressInstance getAddress(java.lang.String name)
public void setVirtualAddress(MmuAddressInstance address)
public void setPhysicalAddress(MmuAddressInstance address)
public void setTargetBuffer(MmuBuffer buffer)
buffer
- the buffer to be set.java.lang.IllegalArgumentException
- if buffer
is null
.public void registerOperation(MmuOperation operation)
operation
- the operation to be registered.java.lang.IllegalArgumentException
- if operation
is null
.public void registerSegment(MmuSegment segment)
segment
- the segment to be registered.java.lang.IllegalArgumentException
- if segment
is null
.public void registerBuffer(MmuBuffer buffer)
Buffers are identified by their name. Buffers with equal names are considered duplicates and ignored.
buffer
- the buffer to be registered.java.lang.IllegalArgumentException
- if buffer
is null
.public MmuBuffer getBuffer(java.lang.String name)
public void registerAction(MmuAction action)
Actions should be registered before transitions.
action
- the action to be registered.java.lang.IllegalArgumentException
- if action
is null.public void registerTransition(MmuTransition transition)
Transitions should be registered after actions.
transition
- the transition to be registered.java.lang.IllegalArgumentException
- if transition
is null.public void setStartAction(MmuAction action)
action
- the initial action.java.lang.IllegalArgumentException
- if action
is null.