TestDrot.cm
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Bertrand Serlet September 25, 1987 3:50:56 pm PDT
Install Drot
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a", "bar ← a"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a * ~a + c * ~c", "bar ← a"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["aux = a * b", "foo ← aux + x * aux"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← gnd", "bar ← ~Vdd", "xx ← Vdd"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a * b + x * (a* b)"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a * b + c * d", "bar ← a * b + c * d"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a * b + c * d", "bar ← a * b + c * d"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a * b + c * d", "bar ← ~(a * b + c * d)"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a * ~a + c * ~c", "bar ← ~(a * b + c * d)"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a+a+a+a+a+a+a"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← a+b+c+d+e+f+g+h"]]
← &ct ← Drot.CellTypeFromExpressions[LIST ["foo ← (x0*x1*x2*x3*x4*x5*x6*x7)+~x0*~(x1*x2*x3*x4*x5*x6*x7)+(x0+~x1+x2)*(x3*x4*x5*x6*x7)+~x8*(x0*x1*x2*x3*x4*x5*x6*x7)+~x0*~(x1*x2*x3*x4*x5*x6*x7)+((x0+~x1+x2)*(x3*x4*x5*x6*x7))"]]
← &adder1 ← Drot.CellTypeFromExpressions[LIST ["sum ← (x1*x2 + ~x1*~x2) *cin + ~cin*(x1*~x2+ ~x1*x2)", "cout ← x1*x2 + cin*x1 + cin*x2"]]
← &adder2 ← Drot.CellTypeFromExpressions[LIST ["sum0 ← (a0*b0 + ~a0*~b0) *cin + ~cin*(a0*~b0+ ~a0*b0)", "aux = a0*b0 + cin*a0 + cin*b0", "sum1 ← (a1*b1 + ~a1*~b1) *aux + ~aux*(a1*~b1+ ~a1*b1)", "cout ← a1*b1 + aux*a1 + aux*b1"]]
← &layout ← $SC
← &mux8 ← Sinix.CreateIcon[Logic.MuxN1[8]]
← CoreProperties.PutCellTypeProp[&mux8, $Layout, &layout]
← &obj ← PWCore.Layout[&mux8]
← PW.Draw[&obj]
← &mux8cg ← Drot.CellTypeFromExpressions[LIST["Output ← Select0*Select1*Select2*In0+Select0*~Select1*Select2*In1+~Select0*Select1*Select2*In2+~Select0*~Select1*Select2*In3+Select0*Select1*~Select2*In4+Select0*~Select1*~Select2*In5+~Select0*Select1*~Select2*In6+~Select0*~Select1*~Select2*In7"]]
← CoreOps.Print[&mux8cg]
← CoreProperties.PutCellTypeProp[&mux8cg, $Layout, &layout]
← &objcg ← PWCore.Layout[&mux8cg]
← PW.Draw[&objcg]
← &cst ← Sinix.CreateIcon[Logic.EqConstant[32, 02BAD2BADH]]
← CoreProperties.PutCellTypeProp[&cst, $Layout, &layout]
← &obj ← PWCore.Layout[&cst]
← PW.Draw[&obj]
← Convert.RopeFromInt[02BAD2BADH, 2, FALSE]
What is important is to have the same number of 0 and 1's!
← &cstcg ← Drot.CellTypeFromExpressions[LIST["Output ← In00*~In01*In02*~In03*In04*In05*In06*~In07*In08*~In09*In10*In11*~In12*In13*~In14*~In15*In16*~In17*In18*~In19*In20*In21*In22*~In23*In24*~In25*In26*In27*~In28*In29*~In30*~In31"]]
← CoreOps.Print[&cstcg]
← CoreProperties.PutCellTypeProp[&cstcg, $Layout, &layout]
← &objcg ← PWCore.Layout[&cstcg]
← PW.Draw[&objcg]
← &cst ← Sinix.CreateIcon[Logic.EqConstant[32, 15]] -- 4 ones and 28 zeros
← CoreProperties.PutCellTypeProp[&cst, $Layout, &layout]
← &obj ← PWCore.Layout[&cst]
← PW.Draw[&obj]
What is important is to have the same number of 0 and 1's!
← &cstcg ← Drot.CellTypeFromExpressions[LIST["Output ← In00*In01*In02*In03*~In04*~In05*~In06*~In07*~In08*~In09*~In10*~In11*~In12*~In13*~In14*~In15*~In16*~In17*~In18*~In19*~In20*~In21*~In22*~In23*~In24*~In25*~In26*~In27*~In28*~In29*~In30*~In31"]]
← CoreOps.Print[&cstcg]
← CoreProperties.PutCellTypeProp[&cstcg, $Layout, &layout]
← &objcg ← PWCore.Layout[&cstcg]
← PW.Draw[&objcg]