TestCombinatorial.cm
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Bertrand Serlet September 17, 1987 11:28:04 am PDT
Install Combinatorial
Run -a TestCombinatorial
Basic Parsing/Unparsing Tests
← TestCombinatorial.StdToLisp["b[0].foo.bar[1]"]
← TestCombinatorial.StdToLisp["~x"]
← TestCombinatorial.StdToLisp["a+b*c"]
← TestCombinatorial.StdToLisp["xor2(a, b)"]
← TestCombinatorial.StdToLisp["a+b[0].foo.bar[1]* [2] + xor2(a, b) * ~ ~~foo + (a * (b + c))"]
← &expr ← "a+b[0].foo.bar[1]* [2] + xor2(a, b) * ~ ~~foo + (a * (b + c))+ equal(2, 3, a)"
← &expr2 ← Combinatorial.UnParseExpression[Combinatorial.ParseExpression[&expr]]
IF Rope.Equal[Combinatorial.UnParseExpression[Combinatorial.ParseExpression[&expr2]], &expr2] THEN NIL ELSE ERROR
Simulation Tests
← TestCombinatorial.FixLibrary["inv", "~I"]
← TestCombinatorial.FixLibrary["nand2", "~(I-A * I-B)"]
← TestCombinatorial.FixLibrary["and2", "I-A * I-B"]
← TestCombinatorial.FixLibrary["nor2", "~(I-A + I-B)"]
← TestCombinatorial.FixLibrary["or2", "I-A + I-B"]
← TestCombinatorial.FixLibrary["xnor2", "~xor2(I-A, I-B)"]
← TestCombinatorial.FixLibrary["xor2", "xor2(I-A, I-B)"]
← TestCombinatorial.FixLibrary["nand3", "~(I-A * I-B * I-C)"]
← TestCombinatorial.FixLibrary["and3", "I-A * I-B * I-C"]
← TestCombinatorial.FixLibrary["nor3", "~(I-A + I-B + I-C)"]
← TestCombinatorial.FixLibrary["or3", "I-A + I-B + I-C"]
← TestCombinatorial.FixLibrary["a21o2i", "~(A*B+C)"]
-- Some other 3 input gates missing
← TestCombinatorial.FixLibrary["nand4", "~(I-A * I-B * I-C * I-D)"]
← TestCombinatorial.FixLibrary["nor4", "~(I-A + I-B + I-C + I-D)"]
← TestCombinatorial.FixLibrary["and4", "I-A * I-B * I-C * I-D"]
← TestCombinatorial.FixLibrary["or4", "I-A + I-B + I-C + I-D"]
← TestCombinatorial.FixLibrary["a22o2i", "~(A*B+C*D)"]
← TestCombinatorial.FixLibrary["o22a2i", "~((A+B)*(C+D))"]
MakeCombinatorial Tests
← &ct ← TestCombinatorial.CMOSBCell["and3(a, b, xor2(c, d))"]
← Combinatorial.MakeCombinatorial[&ct]
← CoreOps.Print[&ct]
← Combinatorial.CheckTransistorsAgainstExpressions[&ct]
← &ct ← Logic.And[5]
← Combinatorial.MakeCombinatorial[&ct]
← CoreOps.Print[&ct]
← Combinatorial.CheckTransistorsAgainstExpressions[&ct]
← &ct ← Logic.DecoderS[3]
← Combinatorial.MakeCombinatorial[&ct]
← CoreOps.Print[&ct]
← Combinatorial.CheckTransistorsAgainstExpressions[&ct]
SplitCombinatorialOnce Tests
← &ct ← TestCombinatorial.CMOSBCell["inv(in)"]
← &rct ← CombinatorialImpl.SplitCombinatorial[&ct]
← Combinatorial.MakeCombinatorial[&rct]
← Combinatorial.CheckTransistorsAgainstExpressions[&rct]
← &ct ← TestCombinatorial.CMOSBCell["and3(a, b, xor2(c, d))"]
← &rct ← CombinatorialImpl.SplitCombinatorial[&ct]
← Combinatorial.MakeCombinatorial[&rct]
← Combinatorial.CheckTransistorsAgainstExpressions[&rct]
← &ct ← LogicUtils.Extract["ffRP.sch"]
← CoreOps.Print[&ct]
← &rct ← CombinatorialImpl.SplitCombinatorial[&ct]
← CoreOps.Print[&rct]
← &design ← PW.OpenDesign["TestCombinatorial.dale"]
← &ct ← Sisyph.ES["Test2FF.sch", Sisyph.Create[&design]]
← &rct ← CombinatorialImpl.SplitCombinatorial[&ct]
← CoreOps.Print[&rct]