synth_ecp5: rename dram to lutram everywhere.
authorwhitequark <whitequark@whitequark.org>
Tue, 16 Jul 2019 20:44:55 +0000 (20:44 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 16 Jul 2019 20:45:12 +0000 (20:45 +0000)
techlibs/ecp5/Makefile.inc
techlibs/ecp5/dram.txt [deleted file]
techlibs/ecp5/drams_map.v [deleted file]
techlibs/ecp5/lutram.txt [new file with mode: 0644]
techlibs/ecp5/lutrams_map.v [new file with mode: 0644]
techlibs/ecp5/synth_ecp5.cc

index ff39ba4fe1563fa837980ee7cdf474c4b952ba82..73e18112f98ac792d8f82f1cfc5462f1ac21f176 100644 (file)
@@ -4,8 +4,8 @@ OBJS += techlibs/ecp5/synth_ecp5.o techlibs/ecp5/ecp5_ffinit.o
 $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/cells_map.v))
 $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/cells_sim.v))
 $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/cells_bb.v))
-$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/drams_map.v))
-$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/dram.txt))
+$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/lutrams_map.v))
+$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/lutram.txt))
 $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/brams_map.v))
 $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/bram.txt))
 $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/arith_map.v))
diff --git a/techlibs/ecp5/dram.txt b/techlibs/ecp5/dram.txt
deleted file mode 100644 (file)
index b943574..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-bram $__TRELLIS_DPR16X4
-  init 1
-  abits 4
-  dbits 4
-  groups 2
-  ports  1 1
-  wrmode 0 1
-  enable 0 1
-  transp 0 0
-  clocks 0 1
-  clkpol 0 2
-endbram
-
-match $__TRELLIS_DPR16X4
-  make_outreg
-  min wports 1
-endmatch
diff --git a/techlibs/ecp5/drams_map.v b/techlibs/ecp5/drams_map.v
deleted file mode 100644 (file)
index 3b3de83..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-module \$__TRELLIS_DPR16X4 (CLK1, A1ADDR, A1DATA, B1ADDR, B1DATA, B1EN);
-       parameter [63:0] INIT = 64'bx;
-       parameter CLKPOL2 = 1;
-       input CLK1;
-
-       input [3:0] A1ADDR;
-       output [3:0] A1DATA;
-
-       input [3:0] B1ADDR;
-       input [3:0] B1DATA;
-       input B1EN;
-
-       localparam WCKMUX = CLKPOL2 ? "WCK" : "INV";
-
-       TRELLIS_DPR16X4 #(
-               .INITVAL(INIT),
-               .WCKMUX(WCKMUX),
-               .WREMUX("WRE")
-       ) _TECHMAP_REPLACE_ (
-               .RAD(A1ADDR),
-               .DO(A1DATA),
-
-               .WAD(B1ADDR),
-               .DI(B1DATA),
-               .WCK(CLK1),
-               .WRE(B1EN)
-       );
-endmodule
diff --git a/techlibs/ecp5/lutram.txt b/techlibs/ecp5/lutram.txt
new file mode 100644 (file)
index 0000000..b943574
--- /dev/null
@@ -0,0 +1,17 @@
+bram $__TRELLIS_DPR16X4
+  init 1
+  abits 4
+  dbits 4
+  groups 2
+  ports  1 1
+  wrmode 0 1
+  enable 0 1
+  transp 0 0
+  clocks 0 1
+  clkpol 0 2
+endbram
+
+match $__TRELLIS_DPR16X4
+  make_outreg
+  min wports 1
+endmatch
diff --git a/techlibs/ecp5/lutrams_map.v b/techlibs/ecp5/lutrams_map.v
new file mode 100644 (file)
index 0000000..3b3de83
--- /dev/null
@@ -0,0 +1,28 @@
+module \$__TRELLIS_DPR16X4 (CLK1, A1ADDR, A1DATA, B1ADDR, B1DATA, B1EN);
+       parameter [63:0] INIT = 64'bx;
+       parameter CLKPOL2 = 1;
+       input CLK1;
+
+       input [3:0] A1ADDR;
+       output [3:0] A1DATA;
+
+       input [3:0] B1ADDR;
+       input [3:0] B1DATA;
+       input B1EN;
+
+       localparam WCKMUX = CLKPOL2 ? "WCK" : "INV";
+
+       TRELLIS_DPR16X4 #(
+               .INITVAL(INIT),
+               .WCKMUX(WCKMUX),
+               .WREMUX("WRE")
+       ) _TECHMAP_REPLACE_ (
+               .RAD(A1ADDR),
+               .DO(A1DATA),
+
+               .WAD(B1ADDR),
+               .DI(B1DATA),
+               .WCK(CLK1),
+               .WRE(B1EN)
+       );
+endmodule
index 3d189a9f1cc568ba3c8b1f6b30c01a80fe048dd3..143d1f95c0c48828d133e77a12c183c9a077357a 100644 (file)
@@ -71,10 +71,10 @@ struct SynthEcp5Pass : public ScriptPass
                log("        do not use flipflops with CE in output netlist\n");
                log("\n");
                log("    -nobram\n");
-               log("        do not use BRAM cells in output netlist\n");
+               log("        do not use block RAM cells in output netlist\n");
                log("\n");
-               log("    -nodram\n");
-               log("        do not use distributed RAM cells in output netlist\n");
+               log("    -nolutram\n");
+               log("        do not use LUT RAM cells in output netlist\n");
                log("\n");
                log("    -nowidelut\n");
                log("        do not use PFU muxes to implement LUTs larger than LUT4s\n");
@@ -96,7 +96,7 @@ struct SynthEcp5Pass : public ScriptPass
        }
 
        string top_opt, blif_file, edif_file, json_file;
-       bool noccu2, nodffe, nobram, nodram, nowidelut, flatten, retime, abc2, abc9, vpr;
+       bool noccu2, nodffe, nobram, nolutram, nowidelut, flatten, retime, abc2, abc9, vpr;
 
        void clear_flags() YS_OVERRIDE
        {
@@ -107,7 +107,7 @@ struct SynthEcp5Pass : public ScriptPass
                noccu2 = false;
                nodffe = false;
                nobram = false;
-               nodram = false;
+               nolutram = false;
                nowidelut = false;
                flatten = true;
                retime = false;
@@ -172,11 +172,11 @@ struct SynthEcp5Pass : public ScriptPass
                                nobram = true;
                                continue;
                        }
-                       if (args[argidx] == "-nodram") {
-                               nodram = true;
+                       if (args[argidx] == "-nolutram" || /*deprecated alias*/ args[argidx] == "-nodram") {
+                               nolutram = true;
                                continue;
                        }
-                       if (args[argidx] == "-nowidelut" || args[argidx] == "-nomux") {
+                       if (args[argidx] == "-nowidelut" || /*deprecated alias*/ args[argidx] == "-nomux") {
                                nowidelut = true;
                                continue;
                        }
@@ -237,10 +237,10 @@ struct SynthEcp5Pass : public ScriptPass
                        run("techmap -map +/ecp5/brams_map.v");
                }
 
-               if (!nodram && check_label("map_dram", "(skip if -nodram)"))
+               if (!nolutram && check_label("map_lutram", "(skip if -nolutram)"))
                {
-                       run("memory_bram -rules +/ecp5/dram.txt");
-                       run("techmap -map +/ecp5/drams_map.v");
+                       run("memory_bram -rules +/ecp5/lutram.txt");
+                       run("techmap -map +/ecp5/lutrams_map.v");
                }
 
                if (check_label("map_ffram"))