Skip to content

Commit 634f18b

Browse files
committedAug 30, 2017
extract_counter: Minor changes requested to comply with upstream policy, fixed a few typos
1 parent 3fc1b9f commit 634f18b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
 

Diff for: ‎passes/techmap/extract_counter.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ void counter_worker(
385385
}
386386

387387
//Get new cell name
388-
string countname = string("$auto$COUNTx$") + log_id(extract.rwire->name.str());
388+
string countname = string("$COUNTx$") + log_id(extract.rwire->name.str());
389389

390390
//Log it
391391
total_counters ++;
@@ -484,6 +484,7 @@ struct ExtractCounterPass : public Pass {
484484
log("\n");
485485
log(" -maxwidth N\n");
486486
log(" Only extract counters up to N bits wide\n");
487+
log("\n");
487488
log(" -pout X,Y,...\n");
488489
log(" Only allow parallel output from the counter to the listed cell types\n");
489490
log(" (if not specified, parallel outputs are not restricted)\n");
@@ -513,13 +514,13 @@ struct ExtractCounterPass : public Pass {
513514
{
514515
if(pouts[i] == ',')
515516
{
516-
parallel_cells.insert(RTLIL::IdString(tmp));
517+
parallel_cells.insert(RTLIL::escape_id(tmp));
517518
tmp = "";
518519
}
519520
else
520521
tmp += pouts[i];
521522
}
522-
parallel_cells.insert(RTLIL::IdString(tmp));
523+
parallel_cells.insert(RTLIL::escape_id(tmp));
523524
continue;
524525
}
525526

Diff for: ‎techlibs/greenpak4/cells_map.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,23 @@ module \$__COUNT_ (CE, CLK, OUT, POUT, RST, UP);
164164
//If we have a CE, or DIRECTION other than DOWN fail... GP_COUNTx_ADV is not supported yet
165165
if(HAS_CE || (DIRECTION != "DOWN") ) begin
166166
initial begin
167-
$display("ERROR: \$__COUNT__ support for GP_COUNTx_ADV is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
167+
$display("ERROR: \$__COUNT_ support for GP_COUNTx_ADV is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
168168
$finish;
169169
end
170170
end
171171

172172
//If counter is more than 14 bits wide, complain (also shouldn't happen)
173173
else if(WIDTH > 14) begin
174174
initial begin
175-
$display("ERROR: \$__COUNT__ support for cascaded counters is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
175+
$display("ERROR: \$__COUNT_ support for cascaded counters is not yet implemented. This counter should never have been extracted (bug in extract_counter pass?).");
176176
$finish;
177177
end
178178
end
179179

180180
//If counter is more than 8 bits wide and has parallel output, we have a problem
181181
else if(WIDTH > 8 && HAS_POUT) begin
182182
initial begin
183-
$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?).");
183+
$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?).");
184184
$finish;
185185
end
186186
end

Diff for: ‎techlibs/greenpak4/synth_greenpak4.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ struct SynthGreenPAK4Pass : public ScriptPass
155155

156156
if (check_label("fine"))
157157
{
158-
run("extract_counter -pout \\GP_DCMP,\\GP_DAC -maxwidth 14");
158+
run("extract_counter -pout GP_DCMP,GP_DAC -maxwidth 14");
159159
run("clean");
160160
run("opt -fast -mux_undef -undriven -fine");
161161
run("memory_map");

0 commit comments

Comments
 (0)
Please sign in to comment.