Skip to content

Commit 0bef7ed

Browse files
committed
[Odin]: - fix Odin-II's techmap flow codebase format
- add more comments to the Odin-II codebase - fix an invalid dpram instance parameters in mkDelayWorker32B Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent abbd702 commit 0bef7ed

35 files changed

+751
-509
lines changed

ODIN_II/SRC/BLIFElaborate.cpp

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ void blif_elaborate_node(nnode_t* node, short traverse_number, netlist_t* netlis
326326
/**
327327
* (function: resolve_logical_nodes)
328328
*
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
331331
*
332332
* @param node pointing to a logical node
333333
* @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,
344344
case LOGICAL_EQUAL: //fallthrough
345345
case NOT_EQUAL: {
346346
/**
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
348348
*/
349349
prune_logical_node_outputs(node, traverse_mark_number, netlist);
350350
break;
@@ -357,7 +357,7 @@ static void resolve_logical_nodes(nnode_t* node, uintptr_t traverse_mark_number,
357357
case LOGICAL_XOR: //fallthrough
358358
case LOGICAL_XNOR: {
359359
/**
360-
* split logical node into single bit logical node
360+
* split logical node into single bit logical nodes
361361
*/
362362
split_in_single_bit_logic(node, traverse_mark_number, netlist);
363363
break;
@@ -407,8 +407,7 @@ static void resolve_shift_nodes(nnode_t* node, uintptr_t traverse_mark_number, n
407407
*-------------------------------------------------------------------------------------------
408408
* (function: resolve_case_equal_nodes )
409409
*
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
412411
*
413412
* @param node pointing to the netlist node
414413
* @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
445444
*-------------------------------------------------------------------------------------------
446445
* (function: resolve_arithmetic_nodes )
447446
*
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)
450449
*
451450
* @param node pointing to the netlist node
452451
* @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
523522
*-------------------------------------------------------------------------------------------
524523
* (function: resolve_mux_nodes )
525524
*
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
528527
*
529528
* @param node pointing to the netlist node
530529
* @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
576575
*-------------------------------------------------------------------------------------------
577576
* (function: resolve_latch_nodes )
578577
*
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
580580
*
581581
* @param node pointing to the netlist node
582582
* @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
619619
*-------------------------------------------------------------------------------------------
620620
* (function: resolve_ff_nodes )
621621
*
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)
624624
*
625625
* @param node pointing to the netlist node
626626
* @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
691691
*-------------------------------------------------------------------------------------------
692692
* (function: resolve_memory_nodes )
693693
*
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.
696697
*
697698
* @param node pointing to the netlist node
698699
* @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,
757758
*
758759
* @brief going through all FF nodes looking for the clock signals.
759760
* 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.
762763
*
763764
* @param netlist pointer to the current netlist file
764765
*/
765766
static void look_for_clocks(netlist_t* netlist) {
766767
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 */
768769
for (i = 0; i < netlist->num_top_input_nodes; i++) {
769770
nnode_t* input_node = netlist->top_input_nodes[i];
770771
if (!strcmp(input_node->name, DEFAULT_CLOCK_NAME))

0 commit comments

Comments
 (0)