From ec69cbde5b5a347559e072b210bb69a1a01e5034 Mon Sep 17 00:00:00 2001 From: annoyatron255 Date: Sat, 4 May 2024 23:34:07 -0500 Subject: [PATCH] Insert trivial SOPs between OLMCs --- synth_gal.tcl | 3 +++ techmaps/trivial_sop_olmc.v | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 techmaps/trivial_sop_olmc.v diff --git a/synth_gal.tcl b/synth_gal.tcl index 381eeae..a0808df 100755 --- a/synth_gal.tcl +++ b/synth_gal.tcl @@ -88,6 +88,9 @@ techmap -max_iter 1 -map techmaps/pla_olmc_int.v */t:GAL_SOP %co1 */w:* %i */t:G iopadmap -bits -outpad GAL_COMB_OUTPUT_P A:Y */t:GAL_SOP "%x:+\[Y\]" */t:GAL_SOP %d o:* %i 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 + clean -purge ## Write output files diff --git a/techmaps/trivial_sop_olmc.v b/techmaps/trivial_sop_olmc.v new file mode 100644 index 0000000..dd03f5a --- /dev/null +++ b/techmaps/trivial_sop_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(E), + .A(int), + .Y(Y) + ); + + GAL_SOP #( + .WIDTH(1), + .DEPTH(1), + .TABLE(10) + ) trivial_sop ( + .A(A), + .Y(int), + ); + endgenerate +endmodule