extract_counter: Minor changes requested to comply with upstream policy, fixed a few typos

This commit is contained in:
Andrew Zonenberg 2017-08-30 16:27:18 -07:00
parent 3fc1b9f3fd
commit 634f18be96
3 changed files with 8 additions and 7 deletions

View File

@ -385,7 +385,7 @@ void counter_worker(
} }
//Get new cell name //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 //Log it
total_counters ++; total_counters ++;
@ -484,6 +484,7 @@ struct ExtractCounterPass : public Pass {
log("\n"); log("\n");
log(" -maxwidth N\n"); log(" -maxwidth N\n");
log(" Only extract counters up to N bits wide\n"); log(" Only extract counters up to N bits wide\n");
log("\n");
log(" -pout X,Y,...\n"); log(" -pout X,Y,...\n");
log(" Only allow parallel output from the counter to the listed cell types\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"); log(" (if not specified, parallel outputs are not restricted)\n");
@ -513,13 +514,13 @@ struct ExtractCounterPass : public Pass {
{ {
if(pouts[i] == ',') if(pouts[i] == ',')
{ {
parallel_cells.insert(RTLIL::IdString(tmp)); parallel_cells.insert(RTLIL::escape_id(tmp));
tmp = ""; tmp = "";
} }
else else
tmp += pouts[i]; tmp += pouts[i];
} }
parallel_cells.insert(RTLIL::IdString(tmp)); parallel_cells.insert(RTLIL::escape_id(tmp));
continue; continue;
} }

View 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 we have a CE, or DIRECTION other than DOWN fail... GP_COUNTx_ADV is not supported yet
if(HAS_CE || (DIRECTION != "DOWN") ) begin if(HAS_CE || (DIRECTION != "DOWN") ) begin
initial 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; $finish;
end end
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) //If counter is more than 14 bits wide, complain (also shouldn't happen)
else if(WIDTH > 14) begin else if(WIDTH > 14) begin
initial 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; $finish;
end end
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 //If counter is more than 8 bits wide and has parallel output, we have a problem
else if(WIDTH > 8 && HAS_POUT) begin else if(WIDTH > 8 && HAS_POUT) begin
initial 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; $finish;
end end
end end

View File

@ -155,7 +155,7 @@ struct SynthGreenPAK4Pass : public ScriptPass
if (check_label("fine")) 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("clean");
run("opt -fast -mux_undef -undriven -fine"); run("opt -fast -mux_undef -undriven -fine");
run("memory_map"); run("memory_map");