diff --git a/synth_gal.tcl b/synth_gal.tcl index a0808df..6e027e0 100755 --- a/synth_gal.tcl +++ b/synth_gal.tcl @@ -89,7 +89,13 @@ iopadmap -bits -outpad GAL_COMB_OUTPUT_P A:Y */t:GAL_SOP "%x:+\[Y\]" */t:GAL_SOP techmap -map techmaps/olmc_comb.v # Add trivial SOPs between directly connected OLMCs -techmap -max_iter 1 -map techmaps/trivial_sop_olmc.v */t:GAL_OLMC %ci1 */w:* %i */t:GAL_SOP %co1 */w:* %i %i %c %co1 %D */t:GAL_OLMC %D +techmap -max_iter 1 -map techmaps/trivial_sop_olmc.v */t:GAL_OLMC "%ci1:+\[A\]" */w:* %i */t:GAL_SOP %co1 */w:* %i %i %c %co1 %D */t:GAL_OLMC %D + +# Add trivial SOPs between directly connected OLMCs and INPUTs +techmap -max_iter 1 -map techmaps/trivial_sop_olmc.v */t:GAL_OLMC "%ci1:+\[A\]" */w:* %i */t:GAL_INPUT %co1 */w:* %i %i %c %co1 %D + +# Add trivial 1SOPs between directly connected OLMC enables and INPUTs +techmap -max_iter 1 -map techmaps/trivial_1sop_olmc.v */t:GAL_OLMC "%ci1:+\[E\]" */w:* %i */t:GAL_INPUT %co1 */w:* %i %i %c %co1 %D clean -purge diff --git a/techmaps/trivial_1sop_olmc.v b/techmaps/trivial_1sop_olmc.v new file mode 100644 index 0000000..b928588 --- /dev/null +++ b/techmaps/trivial_1sop_olmc.v @@ -0,0 +1,31 @@ +(* techmap_celltype = "GAL_OLMC" *) +module _80_GAL_OLMC (C, E, A, Y); + parameter REGISTERED = 0; + parameter INVERTED = 0; + + input C, E, A; + inout Y; + + wire int; + + generate + GAL_OLMC #( + .REGISTERED(REGISTERED), + .INVERTED(INVERTED) + ) _TECHMAP_REPLACE_ ( + .C(C), + .E(int), + .A(A), + .Y(Y) + ); + + GAL_1SOP #( + .WIDTH(1), + .DEPTH(1), + .TABLE(2'b10) + ) trivial_1sop_olmc ( + .A(E), + .Y(int), + ); + endgenerate +endmodule diff --git a/techmaps/trivial_sop_olmc.v b/techmaps/trivial_sop_olmc.v index dae1421..6f03551 100644 --- a/techmaps/trivial_sop_olmc.v +++ b/techmaps/trivial_sop_olmc.v @@ -23,7 +23,7 @@ module _80_GAL_OLMC (C, E, A, Y); .WIDTH(1), .DEPTH(1), .TABLE(2'b10) - ) trivial_sop ( + ) trivial_sop_olmc ( .A(A), .Y(int), ); diff --git a/testcases/tristate.v b/testcases/tristate.v index c44985d..e41dc4c 100644 --- a/testcases/tristate.v +++ b/testcases/tristate.v @@ -1,8 +1,9 @@ module tristate ( - input a, b, c, - output y + input a, b, c, d, + output x, y ); +assign x = !d; assign y = c ? a && b : 1'bz; endmodule diff --git a/testcases/up_counter.pcf b/testcases/up_counter.pcf index 550e511..4869fb3 100644 --- a/testcases/up_counter.pcf +++ b/testcases/up_counter.pcf @@ -6,4 +6,3 @@ set_io counter[3] 15 set_io counter[4] 16 set_io counter[5] 17 set_io counter[6] 18 -set_io counter[7] 19