Ignore:
Timestamp:
Dec 17, 2012, 6:59:37 AM (7 years ago)
Author:
cameron
Message:

Add CCGO GenerateTestAll? method for @any_carry support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/CCGO.py

    r2699 r2786  
    3030    def GenerateAdvanceInAccess(self, operation_no): return None
    3131    def GenerateAdvanceOutStore(self, operation_no, carry_out_expr): return []
     32    def GenerateTestAll(self, instance_name): return ast.Num(0)
    3233    def GenerateCarryIfTest(self, block_no, ifTest): return ifTest
    3334    def GenerateCarryElseFinalization(self, block_no): return []
     
    114115        return [ast.Assign([ast.Subscript(self.CarryGroupAtt('cq'), ast.Index(ast.Num(cq_index)), ast.Store())],
    115116                           mkCall("bitblock::srli<64>", [adv_out_expr]))]
     117
     118    def GenerateTestAll(self, instance_name):
     119        carry_count = self.carryInfoSet.block_op_count[0]
     120        if carry_count == 0: return ast.Num(0)
     121        else:
     122           #return "%s.carryQ.CarryTest(0, %i)" % (instance_name, carry_count)
     123           return mkCall(ast.Attribute(ast.Attribute(ast.Name(instance_name, ast.Load()), self.carryGroupVar, ast.Load()), 'CarryTest', ast.Load()),
     124                         [ast.Num(0), ast.Num(carry_count)])
    116125    def GenerateCarryIfTest(self, block_no, ifTest):
    117126        carry_count = self.carryInfoSet.block_op_count[block_no]
Note: See TracChangeset for help on using the changeset viewer.