Class RegisterBuilder


  • public class RegisterBuilder
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RegisterBuilder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addLaneSize​(java.lang.String registerName, int laneSizeInBytes)
      Add a vector lane size to the specified register.
      void addRegister​(Register register)  
      void addRegister​(java.lang.String name, java.lang.String description, Address address, int numBytes, boolean bigEndian, int typeFlags)  
      void addRegister​(java.lang.String name, java.lang.String description, Address address, int numBytes, int leastSignificantBit, int bitLength, boolean bigEndian, int typeFlags)  
      Address getProcessContextAddress()
      Returns the processor context address of the first context register added to this builder.
      Register getRegister​(java.lang.String name)
      Returns the register with the given name;
      RegisterManager getRegisterManager()  
      void removeRegister​(java.lang.String name)  
      boolean renameRegister​(java.lang.String oldName, java.lang.String newName)
      Rename a register.
      boolean setFlag​(java.lang.String registerName, int registerFlag)
      Set a register flag for the specified register
      boolean setGroup​(java.lang.String registerName, java.lang.String groupName)
      Set the group name for the specified register
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RegisterBuilder

        public RegisterBuilder()
    • Method Detail

      • addRegister

        public void addRegister​(java.lang.String name,
                                java.lang.String description,
                                Address address,
                                int numBytes,
                                boolean bigEndian,
                                int typeFlags)
      • addRegister

        public void addRegister​(java.lang.String name,
                                java.lang.String description,
                                Address address,
                                int numBytes,
                                int leastSignificantBit,
                                int bitLength,
                                boolean bigEndian,
                                int typeFlags)
      • addRegister

        public void addRegister​(Register register)
      • getProcessContextAddress

        public Address getProcessContextAddress()
        Returns the processor context address of the first context register added to this builder.
        Returns:
        context address
      • removeRegister

        public void removeRegister​(java.lang.String name)
      • getRegister

        public Register getRegister​(java.lang.String name)
        Returns the register with the given name;
        Parameters:
        name - the name of the register to retrieve
      • renameRegister

        public boolean renameRegister​(java.lang.String oldName,
                                      java.lang.String newName)
        Rename a register. This allows generic register names declared within the langauge specification (*.slaspec) to be renamed for a processor variant specification (*.pspec).
        Parameters:
        oldName - original register name
        newName - new register name
        Returns:
        true if rename was successful, else false
      • setGroup

        public boolean setGroup​(java.lang.String registerName,
                                java.lang.String groupName)
        Set the group name for the specified register
        Parameters:
        registerName - register name
        groupName - group name
        Returns:
        true if register was found, else false
      • setFlag

        public boolean setFlag​(java.lang.String registerName,
                               int registerFlag)
        Set a register flag for the specified register
        Parameters:
        registerName - register name
        registerFlag - Register defined flag bit(s)
        Returns:
        true if register was found, else false
      • addLaneSize

        public boolean addLaneSize​(java.lang.String registerName,
                                   int laneSizeInBytes)
        Add a vector lane size to the specified register.
        Parameters:
        registerName - register name
        registerFlag - Register defined flag bit(s)
        Returns:
        true if register was found, else false
        Throws:
        java.lang.UnsupportedOperationException - if register is unable to support the definition of lanes.
        java.lang.IllegalArgumentException - if laneSizeInBytes is invalid