Changeset 1239 for trunk/lib


Ignore:
Timestamp:
Jul 28, 2011, 5:32:56 PM (8 years ago)
Author:
huah
Message:

Changed QuineMcCluskey?.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libgen/Library_Generator/QuineMcCluskey.py

    r1234 r1239  
    22import sys
    33
     4import Operation
     5from Utility import configure
     6
    47sys.path.append("../Library_Tester")
    58
    6 import CalculatingInterface
     9import CalculateResult
    710
    811varNum = 4
     
    348351# there might be a case that [a0^b0, a1'+b1'] and [a0^b0, a1, b1], we don't process it further in this version
    349352if __name__ == "__main__":
    350         #f0Table = ["0", "0", "0", "0", "1", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1"]
    351         #max_f0
    352         #f0Table = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "0", "1", "1"]
    353         #max_f1
    354         #f0Table = ["0", "1", "0", "0", "1", "1", "1", "1", "0", "1", "0", "1", "0", "1", "1", "1"]
    355         #add_f0
    356         #f0Table = ["0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "1", "0", "0", "0"]
    357         #add_f1
    358         #f0Table = ["0", "1", "0", "1", "1", "0", "1", "0", "0", "1", "0", "1", "1", "0", "1", "0"]
    359         #sub_f0
    360         #f0Table = ["0", "1", "1", "0", "0", "0", "1", "1", "1", "0", "0", "1", "1", "1", "0", "0"]
    361         #sub_f1
    362         #f0Table = ["0", "1", "0", "1", "1", "0", "1", "0", "0", "1", "0", "1", "1", "0", "1", "0"]
     353       
     354        arch = configure.SSE2
     355       
     356        definedOperations = Operation.LoadDefinedOperations(configure.AllOperations, arch)
    363357       
    364358        testdata = []
     
    367361                testdata.append((binRepr[0:2], binRepr[2:]))
    368362       
    369         fTable = CalculatingInterface.Calculate("simd_add", 2, testdata, 128)
     363        fTable = CalculateResult.GetResult(definedOperations["simd_add"][2], testdata, configure.RegisterSize[arch])
    370364       
    371365        print fTable
Note: See TracChangeset for help on using the changeset viewer.