Class MmuSubsystem
- java.lang.Object
-
- ru.ispras.microtesk.mmu.model.spec.MmuSubsystem
-
public final class MmuSubsystem extends java.lang.Object
MmuSubsystem
describes a memory management unit (MMU).The description includes a set of buffers and a network (directed acyclic graph with one source and multiple sink nodes) of actions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MmuSubsystem.Builder
static interface
MmuSubsystem.Holder
TheMmuSubsystem.Holder
interface must be implemented by classes generated by the MMU translator which hold MMU specifications.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<MmuAction>
getActions()
Returns the set of actions registered in the memory management unit.MmuAddressInstance
getAddress(java.lang.String name)
Returns an address registered in the MMU by its name.java.util.Collection<MmuAddressInstance>
getAddresses()
Returns the collection of addresses registered in the MMU.MmuBuffer
getBuffer(java.lang.String name)
Returns a buffer registered in the MMU by its name.java.util.Collection<MmuBuffer>
getBuffers()
Returns the collection of buffers registered in the MMU.ru.ispras.fortress.expression.NodeVariable
getDataVariable()
java.lang.String
getName()
MmuOperation
getOperation(java.lang.String name)
Returns an operation registered in the MMU by its name.java.util.Collection<MmuOperation>
getOperations()
Returns the collection of operations registered in the MMU.MmuAddressInstance
getPhysicalAddress()
RegionSettings
getRegion(java.lang.String name)
java.util.Collection<RegionSettings>
getRegions()
MmuSegment
getSegment(java.lang.String name)
Returns a segment registered in the MMU by its name.java.util.Collection<MmuSegment>
getSegments()
Returns the collection of segments registered in the MMU.java.util.List<MmuAddressInstance>
getSortedListOfAddresses()
java.util.List<MmuBuffer>
getSortedListOfBuffers()
MmuAction
getStartAction()
Returns the initial (root) action of the memory management unit.MmuBuffer
getTargetBuffer()
Returns the target buffer (the main memory device).java.util.List<MmuTransition>
getTransitions()
Returns the list of all transitions.java.util.List<MmuTransition>
getTransitions(MmuAction action)
Returns the list of transitions for the given action of the memory management unit.ru.ispras.fortress.expression.NodeVariable
getVariable(java.lang.String name)
MmuAddressInstance
getVirtualAddress()
void
setSettings(GeneratorSettings settings)
java.lang.String
toString()
-
-
-
Method Detail
-
getName
public final java.lang.String getName()
-
setSettings
public void setSettings(GeneratorSettings settings)
-
getVariable
public ru.ispras.fortress.expression.NodeVariable getVariable(java.lang.String name)
-
getDataVariable
public ru.ispras.fortress.expression.NodeVariable getDataVariable()
-
getAddresses
public java.util.Collection<MmuAddressInstance> getAddresses()
Returns the collection of addresses registered in the MMU.- Returns:
- the collection of addresses.
-
getSortedListOfAddresses
public java.util.List<MmuAddressInstance> getSortedListOfAddresses()
-
getAddress
public MmuAddressInstance getAddress(java.lang.String name)
Returns an address registered in the MMU by its name.- Parameters:
name
- the name of the address.- Returns:
- address or
null
it is undefined.
-
getVirtualAddress
public MmuAddressInstance getVirtualAddress()
-
getPhysicalAddress
public MmuAddressInstance getPhysicalAddress()
-
getTargetBuffer
public MmuBuffer getTargetBuffer()
Returns the target buffer (the main memory device).- Returns:
- the target buffer.
-
getOperations
public java.util.Collection<MmuOperation> getOperations()
Returns the collection of operations registered in the MMU.- Returns:
- the collection of operations.
-
getOperation
public MmuOperation getOperation(java.lang.String name)
Returns an operation registered in the MMU by its name.- Parameters:
name
- the name of the operation.- Returns:
- operation or
null
if it is undefined.
-
getSegments
public java.util.Collection<MmuSegment> getSegments()
Returns the collection of segments registered in the MMU.- Returns:
- the collection of segments.
-
getSegment
public MmuSegment getSegment(java.lang.String name)
Returns a segment registered in the MMU by its name.- Parameters:
name
- the name of the segment.- Returns:
- segment or
null
if it is undefined.
-
getRegions
public java.util.Collection<RegionSettings> getRegions()
-
getRegion
public RegionSettings getRegion(java.lang.String name)
-
getBuffers
public java.util.Collection<MmuBuffer> getBuffers()
Returns the collection of buffers registered in the MMU.- Returns:
- the collection of buffers.
-
getSortedListOfBuffers
public java.util.List<MmuBuffer> getSortedListOfBuffers()
-
getBuffer
public MmuBuffer getBuffer(java.lang.String name)
Returns a buffer registered in the MMU by its name.- Parameters:
name
- the name of the buffer.- Returns:
- buffer or
null
if it is undefined.
-
getActions
public java.util.Set<MmuAction> getActions()
Returns the set of actions registered in the memory management unit.- Returns:
- the set of actions.
-
getTransitions
public java.util.List<MmuTransition> getTransitions(MmuAction action)
Returns the list of transitions for the given action of the memory management unit.- Parameters:
action
- the action.- Returns:
- the list of transitions.
- Throws:
java.lang.IllegalArgumentException
- ifaction
is null.
-
getTransitions
public java.util.List<MmuTransition> getTransitions()
Returns the list of all transitions.- Returns:
- List of transitions.
-
getStartAction
public MmuAction getStartAction()
Returns the initial (root) action of the memory management unit.- Returns:
- the initial action.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-