Esempio n. 1
0
    def PopulateOptimizationsToolbar(self):
        self.ftb.addWidget(
            QtWidgets.QLabel(
                'Available Optimizations (check to run on trace): '))
        self.cpcb = QtWidgets.QCheckBox(optimization_names[0])
        self.cpcb.stateChanged.connect(lambda: self.OptimizeTrace(self.cpcb))
        self.ftb.addWidget(self.cpcb)
        self.ftb.addSeparator()

        self.sacb = QtWidgets.QCheckBox(optimization_names[1])
        self.sacb.stateChanged.connect(lambda: self.OptimizeTrace(self.sacb))
        self.ftb.addWidget(self.sacb)
        self.ftb.addSeparator()

        self.oscb = QtWidgets.QCheckBox(optimization_names[2])
        self.oscb.stateChanged.connect(lambda: self.OptimizeTrace(self.oscb))
        self.ftb.addWidget(self.oscb)
        self.ftb.addSeparator()

        self.uocb = QtWidgets.QCheckBox(optimization_names[3])
        self.uocb.stateChanged.connect(lambda: self.OptimizeTrace(self.uocb))
        self.ftb.addWidget(self.uocb)
        self.ftb.addSeparator()

        self.pcb = QtWidgets.QCheckBox(optimization_names[4])
        self.pcb.stateChanged.connect(lambda: self.OptimizeTrace(self.pcb))
        self.ftb.addWidget(self.pcb)
        self.ftb.addSeparator()
Esempio n. 2
0
 def PopulateUpperToolbar(self):
     assert isinstance(self.input, set)
     self.utb.addWidget(
         QtWidgets.QLabel(
             'Input values found (check to highlight in trace): '))
     for value in self.input:
         self.ucb_map.append(QtWidgets.QCheckBox(value))
         self.ucb_map[-1].stateChanged.connect(self.OnValueChecked)
         self.utb.addWidget(self.ucb_map[-1])
         self.utb.addSeparator()
Esempio n. 3
0
 def PopulateSelectiveRegsToolbar(self):
     self.stb.addWidget(QtWidgets.QLabel('Selective Register Folding: '))
     assert isinstance(self.trace, Trace)
     if self.trace.ctx_reg_size == 32:
         for i in range(8):
             self.foldable_regs.append(
                 QtWidgets.QCheckBox(
                     get_reg_by_size(i, self.trace.ctx_reg_size)))
             self.foldable_regs[-1].stateChanged.connect(
                 lambda: self.FoldRegs())
             self.stb.addWidget(self.foldable_regs[-1])
             self.stb.addSeparator()
     elif self.trace.ctx_reg_size == 64:
         for i in range(16):
             self.foldable_regs.append(
                 QtWidgets.QCheckBox(
                     get_reg_by_size(i, self.trace.ctx_reg_size)))
             self.foldable_regs[-1].stateChanged.connect(
                 lambda: self.FoldRegs())
             self.stb.addWidget(self.foldable_regs[-1])
             self.stb.addSeparator()