main on FPADD not on FPADDBase
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 8 Mar 2019 12:59:11 +0000 (12:59 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 8 Mar 2019 12:59:11 +0000 (12:59 +0000)
src/add/nmigen_add_experiment.py

index c45967b87bb85b5e4f473edbbdfd3c033cd4cb87..4a9119d5ce1294735b5a635e6753a2a8b69a8f9f 100644 (file)
@@ -1275,11 +1275,18 @@ class FPADD(FPID):
 
 
 if __name__ == "__main__":
-    alu = FPADDBase(width=32, id_wid=5, single_cycle=True)
-    main(alu, ports=[alu.in_a, alu.in_b] + \
-                    alu.in_t.ports() + \
-                    alu.out_z.ports() + \
-                    [alu.in_mid, alu.out_mid])
+    if True:
+        alu = FPADD(width=32, id_wid=5, single_cycle=True)
+        main(alu, ports=alu.in_a.ports() + \
+                        alu.in_b.ports() + \
+                        alu.out_z.ports() + \
+                        [alu.in_mid, alu.out_mid])
+    else:
+        alu = FPADDBase(width=32, id_wid=5, single_cycle=True)
+        main(alu, ports=[alu.in_a, alu.in_b] + \
+                        alu.in_t.ports() + \
+                        alu.out_z.ports() + \
+                        [alu.in_mid, alu.out_mid])
 
 
     # works... but don't use, just do "python fname.py convert -t v"