@@ -326,8 +326,8 @@ void blif_elaborate_node(nnode_t* node, short traverse_number, netlist_t* netlis
326
326
/* *
327
327
* (function: resolve_logical_nodes)
328
328
*
329
- * @brief resolving the logical nodes by
330
- * connecting the ouput pins[1..n] to GND
329
+ * @brief resolving the logical nodes by connecting the ouput pins[1..n]
330
+ * to GND or splitting them into single bit nodes
331
331
*
332
332
* @param node pointing to a logical node
333
333
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -344,7 +344,7 @@ static void resolve_logical_nodes(nnode_t* node, uintptr_t traverse_mark_number,
344
344
case LOGICAL_EQUAL: // fallthrough
345
345
case NOT_EQUAL: {
346
346
/* *
347
- * remove extra output pins and only keeo the first output pin
347
+ * drive extra output pins by GND and only keep the first output pin connected
348
348
*/
349
349
prune_logical_node_outputs (node, traverse_mark_number, netlist);
350
350
break ;
@@ -357,7 +357,7 @@ static void resolve_logical_nodes(nnode_t* node, uintptr_t traverse_mark_number,
357
357
case LOGICAL_XOR: // fallthrough
358
358
case LOGICAL_XNOR: {
359
359
/* *
360
- * split logical node into single bit logical node
360
+ * split logical node into single bit logical nodes
361
361
*/
362
362
split_in_single_bit_logic (node, traverse_mark_number, netlist);
363
363
break ;
@@ -407,8 +407,7 @@ static void resolve_shift_nodes(nnode_t* node, uintptr_t traverse_mark_number, n
407
407
*-------------------------------------------------------------------------------------------
408
408
* (function: resolve_case_equal_nodes )
409
409
*
410
- * @brief resolving flip flop nodes by exloding them into RTL desing
411
- * with set, reset, clear signals (synchronoush and asynchronous)
410
+ * @brief resolving case equal nodes by instantiating XNOR, AND and invertor gates
412
411
*
413
412
* @param node pointing to the netlist node
414
413
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -445,8 +444,8 @@ static void resolve_case_equal_nodes(nnode_t* node, uintptr_t traverse_mark_numb
445
444
*-------------------------------------------------------------------------------------------
446
445
* (function: resolve_arithmetic_nodes )
447
446
*
448
- * @brief check for missing ports such as carry-in/out in case of
449
- * dealing with generated netlist from other blif files such Yosys.
447
+ * @brief resolving arithmetic nodes by checking for missed port,
448
+ * equalizing pors if needed, or instantiating them (pow, div and mod)
450
449
*
451
450
* @param node pointing to the netlist node
452
451
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -523,8 +522,8 @@ static void resolve_arithmetic_nodes(nnode_t* node, uintptr_t traverse_mark_numb
523
522
*-------------------------------------------------------------------------------------------
524
523
* (function: resolve_mux_nodes )
525
524
*
526
- * @brief resolving flip flop nodes by exloding them into RTL desing
527
- * with set, reset, clear signals (synchronoush and asynchronous)
525
+ * @brief resolving multiplexer nodes depending on their types,
526
+ * and making the selector as the first port
528
527
*
529
528
* @param node pointing to the netlist node
530
529
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -576,7 +575,8 @@ static void resolve_mux_nodes(nnode_t* node, uintptr_t traverse_mark_number, net
576
575
*-------------------------------------------------------------------------------------------
577
576
* (function: resolve_latch_nodes )
578
577
*
579
- * @brief resolving the data latch or asynchrounoush data latch nodes
578
+ * @brief resolving the data latch or asynchronous data latch nodes
579
+ * and dealing with setclr nodes
580
580
*
581
581
* @param node pointing to the netlist node
582
582
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -619,8 +619,8 @@ static void resolve_latch_nodes(nnode_t* node, uintptr_t traverse_mark_number, n
619
619
*-------------------------------------------------------------------------------------------
620
620
* (function: resolve_ff_nodes )
621
621
*
622
- * @brief resolving flip flop nodes by exloding them into RTL desing
623
- * with set, reset, clear signals (synchronoush and asynchronous )
622
+ * @brief resolving flip flop nodes by exploding them into low-level
623
+ * logic with set, reset, and clear signals (synchronous )
624
624
*
625
625
* @param node pointing to the netlist node
626
626
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -691,8 +691,9 @@ static void resolve_ff_nodes(nnode_t* node, uintptr_t traverse_mark_number, netl
691
691
*-------------------------------------------------------------------------------------------
692
692
* (function: resolve_memory_nodes )
693
693
*
694
- * @brief resolving flip flop nodes by exloding them into RTL desing
695
- * with set, reset, clear signals (synchronoush and asynchronous)
694
+ * @brief resolving different types of memory, like single/dual port ram,
695
+ * initializing block memories structure and handling yosys internal memory
696
+ * (inferred implicit memory) to make them ready for partial mapping phase.
696
697
*
697
698
* @param node pointing to the netlist node
698
699
* @param traverse_mark_number unique traversal mark for blif elaboration pass
@@ -757,14 +758,14 @@ static void resolve_memory_nodes(nnode_t* node, uintptr_t traverse_mark_number,
757
758
*
758
759
* @brief going through all FF nodes looking for the clock signals.
759
760
* If they are not clock type, they should be altered to a clock node.
760
- * Since BUF nodes be removed in the partial mapping, the driver of
761
- * the BUF nodes should be considered as a clock node.
761
+ * Since BUF nodes will be removed in the partial mapping, the driver
762
+ * of the BUF nodes should be considered as a clock node.
762
763
*
763
764
* @param netlist pointer to the current netlist file
764
765
*/
765
766
static void look_for_clocks (netlist_t * netlist) {
766
767
int i;
767
- /* looking for the global sim clock among top netlist inputsto change its type if needed */
768
+ /* looking for the global sim clock among top netlist inputs to change its type if needed */
768
769
for (i = 0 ; i < netlist->num_top_input_nodes ; i++) {
769
770
nnode_t * input_node = netlist->top_input_nodes [i];
770
771
if (!strcmp (input_node->name , DEFAULT_CLOCK_NAME))
0 commit comments