Skip to content

Commit 88e04a0

Browse files
committed
[Yosys+Odin-II]: fix cpp format
Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 3bbd45a commit 88e04a0

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

ODIN_II/SRC/BLIFReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ operation_list BLIF::Reader::read_bit_map_find_unknown_gate(int input_count, nno
11911191
/* Assumption that bit map is in order when read from blif */
11921192
else if (line_count_bitmap == 2) {
11931193
/* LOGICAL_XOR */
1194-
if (((strcmp(bit_map[0], "01") == 0) && (strcmp(bit_map[1], "10") == 0)) || ((strcmp(bit_map[0], "10") == 0) && (strcmp(bit_map[1], "01") == 0))) {
1194+
if (((strcmp(bit_map[0], "01") == 0) && (strcmp(bit_map[1], "10") == 0)) || ((strcmp(bit_map[0], "10") == 0) && (strcmp(bit_map[1], "01") == 0))) {
11951195
to_return = LOGICAL_XOR;
11961196
}
11971197
/* LOGICAL_XNOR */
@@ -1380,7 +1380,7 @@ void BLIF::Reader::create_latch_node_and_driver() {
13801380
// to avoid concatenating the top module name to edge sentivity and init value inputs
13811381
if (configuration.coarsen && (input_token_count == 3 || input_token_count == 5))
13821382
names[input_token_count - 1] = resolve_signal_name_based_on_blif_type(nullptr, ptr);
1383-
else
1383+
else
13841384
names[input_token_count - 1] = resolve_signal_name_based_on_blif_type(blif_netlist->identifier, ptr);
13851385
}
13861386

ODIN_II/SRC/BLIFWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ void BLIF::Writer::output_blif(FILE* out, const netlist_t* netlist) {
343343
warn_undriven(node, net);
344344
for (int j = 0; j < net->num_driver_pins; j++) {
345345
// skip if their names is identical
346-
if(coarsen_cleanup && net->driver_pins[j]->name && node->name && !strcmp(net->driver_pins[j]->name, node->name))
346+
if (coarsen_cleanup && net->driver_pins[j]->name && node->name && !strcmp(net->driver_pins[j]->name, node->name))
347347
continue;
348348
fprintf(out, ".names");
349349
print_net_driver(out, node, net, j);

ODIN_II/SRC/YYosys.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void YYosys::execute() {
274274
switch (configuration.input_file_type) {
275275
case (file_type_e::_VERILOG): // fallthrough
276276
case (file_type_e::_VERILOG_HEADER): {
277-
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
277+
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
278278
break;
279279
}
280280
case (file_type_e::_SYSTEM_VERILOG): {
@@ -293,12 +293,7 @@ void YYosys::execute() {
293293
# else
294294
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
295295
# endif
296-
/*
297-
* Check whether cells match libraries, find top module, and run the Yosys basic coarse-grained synthesis steps
298-
* such as proc: Translate processes to netlist components such as MUXs, FFs and latches
299-
* or fsm: Extraction and optimization of finite state machines
300-
* the option "-noalumacc" is to avoid Yosys transforms basic arithmetic operations into alu or macc
301-
*/
296+
// Check whether cells match libraries and find top module
302297
if (global_args.top_level_module_name.provenance() == argparse::Provenance::SPECIFIED) {
303298
run_pass(std::string("hierarchy -check -top " + global_args.top_level_module_name.value() + " -purge_lib"));
304299
} else {
@@ -328,7 +323,6 @@ void YYosys::execute() {
328323
*/
329324
run_pass(std::string("share; opt;"));
330325

331-
332326
// Use a readable name convention
333327
// [NOTE]: the 'autoname' process has a high memory footprint for giant netlists
334328
// we run it after basic optimization passes to reduce the overhead (see issue #2031)
@@ -353,7 +347,7 @@ void YYosys::execute() {
353347
* initial implementation of Yosys+Odin-II, which did not use this pass
354348
*/
355349
run_pass(std::string("techmap */t:$mem */t:$memrd */t:$add */t:$sub */t:$mul */t:$dffsr */t:$dffsre */t:$sr */t:$dlatch */t:$adlatch %% %n"));
356-
350+
357351
// Collects memories, their port and create multiport memory cells
358352
run_pass(std::string("memory_collect; memory_dff;"));
359353
/**
@@ -374,7 +368,6 @@ void YYosys::execute() {
374368
// Turn all DFFs into simple latches
375369
run_pass(std::string("dffunmap; opt -fast -noff;"));
376370

377-
378371
// Check the hierarchy for any unknown modules, and purge all modules (including blackboxes) that aren't used
379372
run_pass(std::string("hierarchy -check -purge_lib"));
380373
// "-undriven" to ensure there is no wire without drive

ODIN_II/SRC/netlist_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,7 @@ void equalize_input_ports_size(nnode_t*& node, uintptr_t traverse_mark_number, n
19031903
/* no change is needed */
19041904
if (port_a_size == port_y_size)
19051905
return;
1906-
1906+
19071907
/**
19081908
* INPUTS
19091909
* A: (width_a)

0 commit comments

Comments
 (0)