extract_counter: Minor changes requested to comply with upstream policy, fixed a...
authorAndrew Zonenberg <azonenberg@drawersteak.com>
Wed, 30 Aug 2017 23:27:18 +0000 (16:27 -0700)
committerAndrew Zonenberg <azonenberg@drawersteak.com>
Wed, 30 Aug 2017 23:28:25 +0000 (16:28 -0700)
passes/techmap/extract_counter.cc
techlibs/greenpak4/cells_map.v
techlibs/greenpak4/synth_greenpak4.cc

index c3e7e94006bfcc2261f7dc0459f0128d269006d1..6b4ea13e242d734340b0d2ebf735227eba09e604 100644 (file)
@@ -385,7 +385,7 @@ void counter_worker(
        }
 
        //Get new cell name
-       string countname = string("$auto$COUNTx$") + log_id(extract.rwire->name.str());
+       string countname = string("$COUNTx$") + log_id(extract.rwire->name.str());
 
        //Log it
        total_counters ++;
@@ -484,6 +484,7 @@ struct ExtractCounterPass : public Pass {
                log("\n");
                log("    -maxwidth N\n");
                log("        Only extract counters up to N bits wide\n");
+               log("\n");
                log("    -pout X,Y,...\n");
                log("        Only allow parallel output from the counter to the listed cell types\n");
                log("        (if not specified, parallel outputs are not restricted)\n");
@@ -513,13 +514,13 @@ struct ExtractCounterPass : public Pass {
                                {
                                        if(pouts[i] == ',')
                                        {
-                                               parallel_cells.insert(RTLIL::IdString(tmp));
+                                               parallel_cells.insert(RTLIL::escape_id(tmp));
                                                tmp = "";
                                        }
                                        else
                                                tmp += pouts[i];
                                }
-                               parallel_cells.insert(RTLIL::IdString(tmp));
+                               parallel_cells.insert(RTLIL::escape_id(tmp));
                                continue;
                        }
 
index 1450eac2e6b6ff3b0e67964ca9b87d1a210b89c9..b0ec9fd3efe691be10323f31ae2601851483c49f 100644 (file)
@@ -164,7 +164,7 @@ module \$__COUNT_ (CE, CLK, OUT, POUT, RST, UP);
        //If we have a CE, or DIRECTION other than DOWN fail... GP_COUNTx_ADV is not supported yet
        if(HAS_CE || (DIRECTION != "DOWN") ) begin
                initial begin
-                       $display("ERROR: \$__COUNT__ support for GP_COUNTx_ADV is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
+                       $display("ERROR: \$__COUNT_ support for GP_COUNTx_ADV is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
                        $finish;
                end
        end
@@ -172,7 +172,7 @@ module \$__COUNT_ (CE, CLK, OUT, POUT, RST, UP);
        //If counter is more than 14 bits wide, complain (also shouldn't happen)
        else if(WIDTH > 14) begin
                initial begin
-                       $display("ERROR: \$__COUNT__ support for cascaded counters is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
+                       $display("ERROR: \$__COUNT_ support for cascaded counters is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
                        $finish;
                end
        end
@@ -180,7 +180,7 @@ module \$__COUNT_ (CE, CLK, OUT, POUT, RST, UP);
        //If counter is more than 8 bits wide and has parallel output, we have a problem
        else if(WIDTH > 8 && HAS_POUT) begin
                initial begin
-                       $display("ERROR: \$__COUNT__ support for 9-14 bit counters with parallel output is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
+                       $display("ERROR: \$__COUNT_ support for 9-14 bit counters with parallel output is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
                        $finish;
                end
        end
index 56ea8003e32047ffb3c804c5f13c6100f660f964..5e0e9e5d54761e2ca6dc14e891ac99454c85eb08 100644 (file)
@@ -155,7 +155,7 @@ struct SynthGreenPAK4Pass : public ScriptPass
 
                if (check_label("fine"))
                {
-                       run("extract_counter -pout \\GP_DCMP,\\GP_DAC -maxwidth 14");
+                       run("extract_counter -pout GP_DCMP,GP_DAC -maxwidth 14");
                        run("clean");
                        run("opt -fast -mux_undef -undriven -fine");
                        run("memory_map");