Compile the alu now gives a nice design with a four bit inverter, four bit
and gate and a multiplexer!
constant e a b =
e +> (e +> (e +> (singleton e )))
-inv = hwnot
-
invop :: Op n Bit
-invop a b = map inv a
+invop a b = map hwnot a
-xand = hwand
andop :: Op n Bit
-andop a b = zipWith xand a b
+andop a b = zipWith hwand a b
type Op n e = (TFVec n e -> TFVec n e -> TFVec n e)
type Opcode = Bit
High -> op2 a b
actual_alu :: Opcode -> TFVec D4 Bit -> TFVec D4 Bit -> TFVec D4 Bit
-actual_alu = alu (constant Low) andop
+--actual_alu = alu (constant Low) andop
+actual_alu = alu invop andop