Class MmuSubsystem.Builder

  • Enclosing class:
    MmuSubsystem

    public static final class MmuSubsystem.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
      • registerVariable

        public void registerVariable​(ru.ispras.fortress.expression.NodeVariable variable)
      • registerVariable

        public void registerVariable​(MmuStruct struct)
      • setDataVariable

        public void setDataVariable​(ru.ispras.fortress.expression.NodeVariable variable)
      • registerAddress

        public void registerAddress​(MmuAddressInstance address)
        Registers the address type in the MMU. Address that have the same name are considered as duplicates and ignored.
        Parameters:
        address - the address to be registered.
        Throws:
        java.lang.IllegalArgumentException - if address is null.
      • setTargetBuffer

        public void setTargetBuffer​(MmuBuffer buffer)
        Sets the target buffer (the main memory device).
        Parameters:
        buffer - the buffer to be set.
        Throws:
        java.lang.IllegalArgumentException - if buffer is null.
      • registerOperation

        public void registerOperation​(MmuOperation operation)
        Registers an operation in the MMU.
        Parameters:
        operation - the operation to be registered.
        Throws:
        java.lang.IllegalArgumentException - if operation is null.
      • registerSegment

        public void registerSegment​(MmuSegment segment)
        Registers a segment in the MMU.
        Parameters:
        segment - the segment to be registered.
        Throws:
        java.lang.IllegalArgumentException - if segment is null.
      • registerBuffer

        public void registerBuffer​(MmuBuffer buffer)
        Registers a buffer in the MMU.

        Buffers are identified by their name. Buffers with equal names are considered duplicates and ignored.

        Parameters:
        buffer - the buffer to be registered.
        Throws:
        java.lang.IllegalArgumentException - if buffer is null.
      • getBuffer

        public MmuBuffer getBuffer​(java.lang.String name)
      • registerAction

        public void registerAction​(MmuAction action)
        Registers the action in the memory management unit.

        Actions should be registered before transitions.

        Parameters:
        action - the action to be registered.
        Throws:
        java.lang.IllegalArgumentException - if action is null.
      • registerTransition

        public void registerTransition​(MmuTransition transition)
        Registers the transition in the memory management unit.

        Transitions should be registered after actions.

        Parameters:
        transition - the transition to be registered.
        Throws:
        java.lang.IllegalArgumentException - if transition is null.
      • setStartAction

        public void setStartAction​(MmuAction action)
        Sets the initial (root) action of the memory management unit.
        Parameters:
        action - the initial action.
        Throws:
        java.lang.IllegalArgumentException - if action is null.