Skip to content

Commit

Permalink
fix docs mapping print output
Browse files Browse the repository at this point in the history
  • Loading branch information
asyms committed Feb 21, 2024
1 parent 13f48a7 commit 3c1b4cb
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions docs/source/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,28 @@ The code block demonstrates how to use it:
The function will show the loops of the temporal mapping and for each operand shows at which memory level it resides.
For example:

********* Temporal Mapping - CostModelEvaluation(layer=LayerNode_0, core=1) *********
O (O): [[('FX', 11), ('FY', 11)], [('OY', 7), ('OY', 2), ('OX', 14), ('K', 12)], []]
W (I2): [[], [('FX', 11), ('FY', 11), ('OY', 7), ('OY', 2), ('OX', 14)], [('K', 12)]]
I (I1): [[('FX', 11), ('FY', 11), ('OY', 7), ('OY', 2), ('OX', 14), ('K', 12)], []]

-------------------------------------------------------------------------------------
Temporal Loops O W I
-------------------------------------------------------------------------------------
for K in [0:12) sram_2MB dram sram_2MB
-------------------------------------------------------------------------------------
for OX in [0:14) sram_2MB sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for OY in [0:2) sram_2MB sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for OY in [0:7) sram_2MB sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for FY in [0:11) rf_2B sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for FX in [0:11) rf_2B sram_32KB sram_2MB
-------------------------------------------------------------------------------------
::

********* Temporal Mapping - CostModelEvaluation(layer=LayerNode_0, core=1) *********
O (O): [[('FX', 11), ('FY', 11)], [('OY', 7), ('OY', 2), ('OX', 14), ('K', 12)], []]
W (I2): [[], [('FX', 11), ('FY', 11), ('OY', 7), ('OY', 2), ('OX', 14)], [('K', 12)]]
I (I1): [[('FX', 11), ('FY', 11), ('OY', 7), ('OY', 2), ('OX', 14), ('K', 12)], []]
-------------------------------------------------------------------------------------
Temporal Loops O W I
-------------------------------------------------------------------------------------
for K in [0:12) sram_2MB dram sram_2MB
-------------------------------------------------------------------------------------
for OX in [0:14) sram_2MB sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for OY in [0:2) sram_2MB sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for OY in [0:7) sram_2MB sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for FY in [0:11) rf_2B sram_32KB sram_2MB
-------------------------------------------------------------------------------------
for FX in [0:11) rf_2B sram_32KB sram_2MB
-------------------------------------------------------------------------------------

The top loop is the outer-most for loop, where as the bottom loop is the inner-most. Going from bottom to top, loops are allocated to the innermost memories of the memory hierarchy for each operand.
The names of the memories match the names of the ``MemoryInstance`` object used to create the memory level using the ``add_memory()`` call in the ``MemoryHierarchy``.
Expand Down

0 comments on commit 3c1b4cb

Please sign in to comment.