Package mars.tools

Class BHTSimGUI

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class BHTSimGUI extends JPanel
Represents the GUI of the BHT Simulator Tool.

The GUI consists of mainly four parts:

  • A configuration panel to select the number of entries and the history size
  • A information panel that displays the most recent branch instruction including its address and BHT index
  • A table representing the BHT with all entries and their internal state and statistics
  • A log panel that summarizes the predictions in a textual form
Author:
ingo.kofler@itec.uni-klu.ac.at
See Also:
Serialized Form
  • Field Details

    • COLOR_PREPREDICTION

      public static final Color COLOR_PREPREDICTION
      constant for the color that highlights the current BHT entry
    • COLOR_PREDICTION_CORRECT

      public static final Color COLOR_PREDICTION_CORRECT
      constant for the color to signal a correct prediction
    • COLOR_PREDICTION_INCORRECT

      public static final Color COLOR_PREDICTION_INCORRECT
      constant for the color to signal a misprediction
    • BHT_TAKE_BRANCH

      public static final String BHT_TAKE_BRANCH
      constant for the String representing "take the branch"
      See Also:
      Constant Field Values
    • BHT_DO_NOT_TAKE_BRANCH

      public static final String BHT_DO_NOT_TAKE_BRANCH
      constant for the String representing "do not take the branch"
      See Also:
      Constant Field Values
  • Constructor Details

    • BHTSimGUI

      public BHTSimGUI()
      Creates the GUI components of the BHT Simulator The GUI is a subclass of JPanel which is integrated in the GUI of the MARS tool
  • Method Details

    • getCbBHTentries

      public JComboBox<Integer> getCbBHTentries()
      Returns the combo box for selecting the number of BHT entries.
      Returns:
      the reference to the combo box
    • getCbBHThistory

      public JComboBox<Integer> getCbBHThistory()
      Returns the combo box for selecting the size of the BHT history.
      Returns:
      the reference to the combo box
    • getCbBHTinitVal

      public JComboBox<String> getCbBHTinitVal()
      Returns the combo box for selecting the initial value of the BHT
      Returns:
      the reference to the combo box
    • getTabBHT

      public JTable getTabBHT()
      Returns the table representing the BHT.
      Returns:
      the reference to the table
    • getTaLog

      public JTextArea getTaLog()
      Returns the text area for log purposes.
      Returns:
      the reference to the text area
    • getTfInstruction

      public JTextField getTfInstruction()
      Returns the text field for displaying the most recent branch instruction
      Returns:
      the reference to the text field
    • getTfAddress

      public JTextField getTfAddress()
      Returns the text field for displaying the address of the most recent branch instruction
      Returns:
      the reference to the text field
    • getTfIndex

      public JTextField getTfIndex()
      Returns the text field for displaying the corresponding index into the BHT
      Returns:
      the reference to the text field