From 3c1b4cbcf59450488fc240f042e0d62906304e67 Mon Sep 17 00:00:00 2001 From: Arne Symons Date: Wed, 21 Feb 2024 11:00:50 +0100 Subject: [PATCH] fix docs mapping print output --- docs/source/visualization.rst | 42 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/docs/source/visualization.rst b/docs/source/visualization.rst index c1326274..8bb988b8 100644 --- a/docs/source/visualization.rst +++ b/docs/source/visualization.rst @@ -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``.