compiler/pe.py
def exec_inst(self, inst):
        """ Execution step: 1) Get the operands; 2) Do the operation; 3) Store results """
        op = inst.op
        dests = inst.dests
        srcs = inst.srcs

        if op == "NOP":
            self.cycle += 1
            return
        src_values = self.sync(srcs)
        if op == "+":
            src0 = src_values[0]
            src1 = src_values[1]
            out = self.add(src0, src1)
            out_entry = Ns_entry(data=out)
        elif op == "-":
            src0 = src_values[0]
            src1 = src_values[1]
            out = self.sub(src0, src1)
            out_entry = Ns_entry(data=out)            
        elif op == '*':
            src0 = src_values[0]
            src1 = src_values[1]
            out = self.mul(src0, src1)
            out_entry = Ns_entry(data=out)
        elif op == "pass":
            src0 = src_values[0]
            out_entry = Ns_entry(data=src0)

        for dest in dests:
            dest_ns = dest.namespace
            dest_index = dest.index
            out_copy = Ns_entry(out_entry.valid, out_entry.data)
            if dest_ns[:2] == "NN" or dest_ns[:2] == "NB":
                dest_namespace = self.namespace_map[dest_ns]
                while not dest_namespace.insert(0, out_copy):
                    pass
            elif dest_ns == "NL":
                continue
            else:
                dest_namespace = self.namespace_map[dest_ns]
                while not dest_namespace.insert(dest_index, out_copy):
                    pass
        self.cycle += 1
 Execution step: 1) Get the operands; 2) Do the operation; 3) Store results 
Execution step: 1) Get the operands; 2) Do the operation; 3) Store results
Execution step : 1 ) Get the operands ; 2 ) Do the operation ; 3 ) Store results
def exec_inst(self, inst):
        op = inst.op
        dests = inst.dests
        srcs = inst.srcs
        if op == "NOP":
            self.cycle += 1
            return
        src_values = self.sync(srcs)
        if op == "+":
            src0 = src_values[0]
            src1 = src_values[1]
            out = self.add(src0, src1)
            out_entry = Ns_entry(data=out)
        elif op == "-":
            src0 = src_values[0]
            src1 = src_values[1]
            out = self.sub(src0, src1)
            out_entry = Ns_entry(data=out)            
        elif op == '*':
            src0 = src_values[0]
            src1 = src_values[1]
            out = self.mul(src0, src1)
            out_entry = Ns_entry(data=out)
        elif op == "pass":
            src0 = src_values[0]
            out_entry = Ns_entry(data=src0)
        for dest in dests:
            dest_ns = dest.namespace
            dest_index = dest.index
            out_copy = Ns_entry(out_entry.valid, out_entry.data)
            if dest_ns[:2] == "NN" or dest_ns[:2] == "NB":
                dest_namespace = self.namespace_map[dest_ns]
                while not dest_namespace.insert(0, out_copy):
                    pass
            elif dest_ns == "NL":
                continue
            else:
                dest_namespace = self.namespace_map[dest_ns]
                while not dest_namespace.insert(dest_index, out_copy):
                    pass
        self.cycle += 1
def exec_inst ( self , inst ) : op = inst . op dests = inst . dests srcs = inst . srcs if op == "NOP" : self . cycle += 1 return src_values = self . sync ( srcs ) if op == "+" : src0 = src_values [ 0 ] src1 = src_values [ 1 ] out = self . add ( src0 , src1 ) out_entry = Ns_entry ( data = out ) elif op == "-" : src0 = src_values [ 0 ] src1 = src_values [ 1 ] out = self . sub ( src0 , src1 ) out_entry = Ns_entry ( data = out ) elif op == '*' : src0 = src_values [ 0 ] src1 = src_values [ 1 ] out = self . mul ( src0 , src1 ) out_entry = Ns_entry ( data = out ) elif op == "pass" : src0 = src_values [ 0 ] out_entry = Ns_entry ( data = src0 ) for dest in dests : dest_ns = dest . namespace dest_index = dest . index out_copy = Ns_entry ( out_entry . valid , out_entry . data ) if dest_ns [ : 2 ] == "NN" or dest_ns [ : 2 ] == "NB" : dest_namespace = self . namespace_map [ dest_ns ] while not dest_namespace . insert ( 0 , out_copy ) : pass elif dest_ns == "NL" : continue else : dest_namespace = self . namespace_map [ dest_ns ] while not dest_namespace . insert ( dest_index , out_copy ) : pass self . cycle += 1
Execution step: 1) Get the operands; 2) Do the operation; 3) Store results
Execution step : 1 ) Get the operands ; 2 ) Do the operation ; 3 ) Store results
""" Execution step: 1) Get the operands; 2) Do the operation; 3) Store results """
self
inst