Changeset 1582


Ignore:
Timestamp:
Oct 23, 2011, 5:59:28 PM (8 years ago)
Author:
cameron
Message:

LibraryTester?: bitblock_srl, sll tests: bypass opPattern==4

Location:
trunk/libgen
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libgen/Library_Generator/Operation.py

    r1579 r1582  
    181181                #This is a logic operation, return its name as the calling prefix
    182182                        return self.name
    183                 elif self.opPattern == 3:
    184                 #class::op(...)
    185                         return self.classType + "::" + self.name
    186                 elif self.opPattern == 4:
    187                 #class::op<..>(...)
    188                         return self.classType + "::" + self.name + "<" + "$" + self.templateArg.name + "$" + ">"
    189                        
    190                 cppText = self.classType + "<" + "$fw$" + ">" + "::" + self.name
    191                 if self.opPattern == 1:
     183                cppText = self.classType
     184                if self.opPattern == 1:  # Have a field-width parameter
     185                        cppText += "<" + "$fw$" + ">"
     186                cppText += "::" + self.name
     187                if self.opPattern == 1 or self.opPattern == 4:  # Have a template arg
    192188                        cppText += "<" + "$" + self.templateArg.name + "$" + ">"
    193189                return cppText
  • trunk/libgen/Library_Tester/CalculateResult.py

    r1579 r1582  
    3131                elif operation.opPattern == 4:
    3232                        #bitblock operations
    33                         ret = calcModule.GetResult(data[-1], data)
     33                        #ret = calcModule.GetResult(data[-1], data)
     34                        pass
    3435                else:
    3536                        print "unknown operation!"
  • trunk/libgen/Library_Tester/GenerateCppTests.py

    r1521 r1582  
    145145                        #logic operations and normal operations
    146146                        funcDefs += NormalFuncMakeCppText(arch, operation, validOperations, testingData)
     147                elif operation.opPattern == 4:
     148                        pass
    147149                else:
    148150                        print "unknown operation pattern!"
     
    150152        mainBody = "int main()\n{\n"
    151153        for opFullName in validOperations:
     154                operation = definedOperations[opFullName][1]
     155                if operation.opPattern == 4: continue
    152156                for vop in validOperations[opFullName]:
    153157                        mainBody += "\t" + "Testing_" + opFullName + "(" + str(vop.fw) + ")" + ";\n"
     
    172176                        #bitblock operations
    173177                        testingData[opFullName + "_" + str(regSize)] = GenData.MakeRandomData(operation, regSize, maxTestCase)
     178                elif operation.opPattern == 4:
     179                        pass
    174180                else:
    175181                        #operations with other types
Note: See TracChangeset for help on using the changeset viewer.