Changes to addressing and token management
This commit is contained in:
parent
ccd88fbfc1
commit
d9017eaa8e
15 changed files with 565 additions and 297 deletions
17
README.md
17
README.md
|
@ -1,12 +1,3 @@
|
|||
# Defines
|
||||
|
||||
`cmake -DDEFINE_ENABLE_NETRACE=ON`
|
||||
|
||||
enables netrace mode
|
||||
|
||||
`cmake -DDEFINE_ENABLE_GUI=ON`
|
||||
|
||||
enables GUI mode
|
||||
|
||||
# Corona Optical Network on Chip (NoC) Simulation with Ratatoskr
|
||||
|
||||
|
@ -29,9 +20,11 @@ This project simulates the Corona all optical Network-on-Chip (NoC) architecture
|
|||
## Compilation
|
||||
./build.sh
|
||||
|
||||
## Output simple test
|
||||
./sim --configFolder .
|
||||
|
||||
## Output simple test - 1 Task
|
||||
./sim --configFolder simple_test
|
||||
|
||||
## Output - 2 Task
|
||||
./sim --configFolder simple_2_point_test
|
||||
|
||||
|
||||
# Log file
|
||||
|
|
446
config/net.xml
446
config/net.xml
|
@ -48,166 +48,295 @@
|
|||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="4">
|
||||
<xPos value="0.000"/>
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="4"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="5">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="5"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="6">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="6"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="7">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="7"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="8">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="8"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="9">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="9"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="10">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="10"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="11">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="11"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="12">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="12"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="13">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="13"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="14">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="14"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="15">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="15"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="16">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="16"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="5">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="5"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="9">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="9"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="13">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="13"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="17">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="17"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="6">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="6"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="10">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="10"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="14">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="14"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="18">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="18"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="7">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="7"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="11">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="11"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="15">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="15"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="19">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="19"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<!-- <node id="4">
|
||||
<node id="20">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="20"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="21">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="21"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="22">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="22"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="23">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="23"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="24">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="4"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="24"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="5">
|
||||
<node id="25">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="25"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="26">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="26"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="27">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="27"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="28">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="5"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="28"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="6">
|
||||
<node id="29">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="29"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="30">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="30"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="31">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="31"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="32">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="6"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="32"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="7">
|
||||
<node id="33">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="33"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="34">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="34"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="35">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="35"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="36">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="0"/>
|
||||
<idType value="7"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="36"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="8">
|
||||
<node id="37">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="37"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="38">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="38"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="39">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="39"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
</nodes>
|
||||
<!-- <node id="8">
|
||||
<xPos value="0.667"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
|
@ -399,138 +528,9 @@
|
|||
<idType value="15"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
</nodes>
|
||||
|
||||
<node id="16">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="0"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="17">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="1"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="18">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="2"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="19">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="3"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="20">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="4"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="21">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="5"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="22">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="6"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="23">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="7"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="24">
|
||||
<xPos value="0.667"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="8"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="25">
|
||||
<xPos value="0.667"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="9"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="26">
|
||||
<xPos value="0.667"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="10"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="27">
|
||||
<xPos value="0.667"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="11"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="28">
|
||||
<xPos value="1.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="12"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="29">
|
||||
<xPos value="1.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="13"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="30">
|
||||
<xPos value="1.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="14"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="31">
|
||||
<xPos value="1.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="15"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
</nodes> -->
|
||||
|
||||
<!--
|
||||
<connections>
|
||||
<con id="0">
|
||||
<interface value="0"/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<bind>
|
||||
<task value="0"/>
|
||||
<node value="0"/>
|
||||
<node value="8"/>
|
||||
</bind>
|
||||
<bind>
|
||||
<task value="1"/>
|
||||
|
@ -10,6 +10,6 @@
|
|||
</bind>
|
||||
<bind>
|
||||
<task value="2"/>
|
||||
<node value="25"/>
|
||||
<node value="21"/>
|
||||
</bind>
|
||||
</map>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<bind>
|
||||
<task value="0"/>
|
||||
<node value="0"/>
|
||||
<node value="10"/>
|
||||
</bind>
|
||||
<bind>
|
||||
<task value="1"/>
|
||||
<node value="6"/>
|
||||
<node value="21"/>
|
||||
</bind>
|
||||
</map>
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
<outputToFile value="true">report</outputToFile>
|
||||
</general>
|
||||
<noc>
|
||||
<nocFile>config/simple_test/net.xml</nocFile>
|
||||
<nocFile>config/net.xml</nocFile>
|
||||
<flitsPerPacket value="1"/>
|
||||
<bitWidth value="32"/>
|
||||
<Vdd value="5"/>
|
||||
</noc>
|
||||
<application>
|
||||
<benchmark>task</benchmark>
|
||||
<dataFile>config/simple_test/simple_data.xml</dataFile>
|
||||
<mapFile>config/simple_test/simple_map.xml</mapFile>
|
||||
<dataFile>config/simple_data.xml</dataFile>
|
||||
<mapFile>config/simple_map.xml</mapFile>
|
||||
</application>
|
||||
<verbose>
|
||||
<processingElements>
|
||||
|
|
|
@ -80,6 +80,263 @@
|
|||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="8">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="8"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="9">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="9"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="10">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="10"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="11">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="11"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="12">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="12"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="13">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="13"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="14">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="14"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="15">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="15"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="16">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="16"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="17">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="17"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="18">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="18"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="19">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="19"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="20">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="20"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="21">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="21"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="22">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="22"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="23">
|
||||
<xPos value="0.000"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="23"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="24">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="24"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="25">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="25"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="26">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="26"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="27">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="27"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="28">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="28"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="29">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="29"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="30">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="30"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="31">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.333"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="31"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="32">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="32"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="33">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="33"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="34">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="34"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="35">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="0.667"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="35"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="36">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="36"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="37">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="37"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="38">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="38"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
<node id="39">
|
||||
<xPos value="0.333"/>
|
||||
<yPos value="1.000"/>
|
||||
<zPos value="0.000"/>
|
||||
<nodeType value="1"/>
|
||||
<idType value="39"/>
|
||||
<layerType value="0"/>
|
||||
</node>
|
||||
</nodes>
|
||||
<!-- <node id="8">
|
||||
<xPos value="0.667"/>
|
||||
<yPos value="0.000"/>
|
||||
<zPos value="0.000"/>
|
||||
|
@ -875,5 +1132,5 @@
|
|||
</port>
|
||||
</ports>
|
||||
</con>
|
||||
</connections>
|
||||
</connections> -->
|
||||
</network-on-chip>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<bind>
|
||||
<task value="0"/>
|
||||
<node value="0"/>
|
||||
<node value="10"/>
|
||||
</bind>
|
||||
<bind>
|
||||
<task value="1"/>
|
||||
<node value="2"/>
|
||||
<node value="21"/>
|
||||
</bind>
|
||||
</map>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
59 ns: INFO: MY_LOG: Flits generated for packet of id 0 to be sent to 0.000000,0.667000,0.000000 from 0.000000,0.000000,0.000000
|
||||
59 ns: INFO: MY_LOG: Network Interface 0 of Source Router: 0: Processing packet flit with ID: 1 for router 3 and Network Interface 12 at time: 59 ns
|
||||
59 ns: INFO: MY_LOG: Flits generated for packet of id 0 to be sent to 0.000000,1.000000,0.000000 from 0.000000,0.000000,0.000000
|
||||
59 ns: INFO: MY_LOG: Network Interface 10 of Source Router: 0: Processing packet flit with ID: 1 for router 3 and Network Interface 21 at time: 59 ns
|
||||
59 ns: INFO: MY_LOG: Router Layer.NocTlm.router0: Received transaction with data at time: 59 ns
|
||||
59 ns: INFO: MY_LOG: Network Interface core0_0: Transaction successful, flit sent ID: 1 at time: 59 ns
|
||||
59 ns: INFO: MY_LOG: Network Interface core0_2: Transaction successful, flit sent ID: 1 at time: 59 ns
|
||||
59 ns: INFO: MY_LOG: router id: 0, dest Router id: 3
|
||||
59 ns: INFO: MY_LOG: Token for destination router 3 granted to Router 0
|
||||
59 ns: INFO: MY_LOG: Router: 0 forwarded data with ID: 1 to Router_3
|
||||
89 ns: INFO: MY_LOG: Router 0 released token for destination router 3
|
||||
89 ns: INFO: MY_LOG: Router 3: Received transaction with data: 1 from Router 0 after a delay of:30 ns
|
||||
89 ns: INFO: MY_LOG: Router 3: Forwarding transaction with data: 1 to Processing Element 12
|
||||
89 ns: INFO: MY_LOG: Network Interface 12 of parent Router: 3: Processing transaction and received flit ID: 1
|
||||
89 ns: INFO: MY_LOG: Router 3: Network Interface 12 completed transaction, data ID: 1
|
||||
89 ns: INFO: MY_LOG: Router 3: Forwarding transaction with data: 1 to Processing Element 21
|
||||
89 ns: INFO: MY_LOG: Network Interface 21 of parent Router: 3: Processing transaction and received flit ID: 1
|
||||
89 ns: INFO: MY_LOG: Router 3: Network Interface 21 completed transaction, data ID: 1
|
||||
|
|
|
@ -34,22 +34,26 @@ namespace po = boost::program_options;
|
|||
|
||||
int sc_main(int arg_num, char *arg_vec[])
|
||||
{
|
||||
|
||||
po::variables_map vm;
|
||||
po::options_description desc("Allowed Options");
|
||||
desc.add_options()("configFolder", po::value<std::string>()->default_value(""), "Input path for config.xml and net.xml");
|
||||
try {
|
||||
|
||||
po::store(po::parse_command_line(arg_num, arg_vec, desc), vm);
|
||||
po::notify(vm);
|
||||
}
|
||||
catch (po::error &e) {
|
||||
|
||||
cerr << "ERROR: " << e.what() << endl << endl << desc << endl;
|
||||
return 1;
|
||||
}
|
||||
std::string configFolder = vm["configFolder"].as<std::string>();
|
||||
|
||||
|
||||
// start simulation
|
||||
std::unique_ptr<NetworkManager> networkManager =
|
||||
std::make_unique<NetworkManager>("Layer", configFolder);
|
||||
|
||||
GlobalResources& globalResources = GlobalResources::getInstance();
|
||||
cout << "Random seed " << globalResources.rd_seed << endl;
|
||||
cout << endl
|
||||
|
|
|
@ -139,15 +139,18 @@ void NetworkInterfaceTlm::send_packet_to_router() {
|
|||
my_payload* trans = nullptr;
|
||||
|
||||
unsigned int src_core_id = p->src.id;
|
||||
unsigned int src_router_id = src_core_id/CORE_NO;
|
||||
int src_router_id = ((src_core_id - CORE_OFFSET) / CORE_NO);
|
||||
std::cout<<"source router id is: "<< src_router_id << std::endl;
|
||||
unsigned int dst_core_id = p->dst.id;
|
||||
unsigned int destination_router_id = dst_core_id/CORE_NO;
|
||||
int destination_router_id = ((dst_core_id - CORE_OFFSET) /CORE_NO);
|
||||
std::cout<<"destination router id is: "<< destination_router_id << std::endl;
|
||||
sc_time delay = sc_time(0, SC_NS);
|
||||
|
||||
std::cout<<"source PE ID: "<<p->src.id<<" destination PE ID: "<<p->dst.id<<std::endl;
|
||||
trans = new my_payload(src_core_id, src_router_id, dst_core_id, destination_router_id, current_flit, sc_time_stamp());
|
||||
// Construct the address (calculation based on router/core IDs)
|
||||
unsigned int offset = 0x20; // offset
|
||||
unsigned int address = (destination_router_id << 12) | (dst_core_id << 8) | offset;
|
||||
unsigned int offset = 0x20; // Offset remains the same
|
||||
unsigned int address = (destination_router_id << 16) | (dst_core_id << 8) | offset;
|
||||
|
||||
trans->set_address(address);
|
||||
log_info( "Network Interface " + std::to_string(src_core_id) + " of Source Router: " + std::to_string(source_router_id)
|
||||
+ ": Processing packet flit with ID: " + std::to_string(trans->data->id) + " for router " + std::to_string(destination_router_id)
|
||||
|
|
|
@ -37,6 +37,7 @@ NetworkManager::NetworkManager(sc_module_name nm, std::string configFolder){
|
|||
}
|
||||
|
||||
void NetworkManager::createClocks() {
|
||||
|
||||
clocks.resize(globalResources.nodeTypes.size());
|
||||
for (const auto &nodeType : globalResources.nodeTypes) {
|
||||
clocks.at(nodeType->id) = std::make_unique<sc_clock>(
|
||||
|
@ -47,16 +48,19 @@ void NetworkManager::createClocks() {
|
|||
|
||||
|
||||
void NetworkManager::createTrafficPool() {
|
||||
|
||||
unsigned long numOfPEs = CORE_NO * globalResources.nodes.size() / 2;
|
||||
#ifndef ENABLE_NETRACE
|
||||
if (globalResources.benchmark == "task") {
|
||||
tp = std::make_unique<TaskPool>();
|
||||
} else if (globalResources.benchmark == "synthetic") {
|
||||
tp = std::make_unique<SyntheticPool>();
|
||||
} else {
|
||||
FATAL("Please specify correct benchmark type");
|
||||
}
|
||||
#endif
|
||||
#ifndef ENABLE_NETRACE
|
||||
if (globalResources.benchmark == "task") {
|
||||
|
||||
tp = std::make_unique<TaskPool>();
|
||||
} else if (globalResources.benchmark == "synthetic") {
|
||||
|
||||
tp = std::make_unique<SyntheticPool>();
|
||||
} else {
|
||||
FATAL("Please specify correct benchmark type");
|
||||
}
|
||||
#endif
|
||||
// #ifdef ENABLE_NETRACE
|
||||
// tp = std::make_unique<NetracePool>("NetracePool");
|
||||
// #endif
|
||||
|
@ -64,36 +68,39 @@ void NetworkManager::createTrafficPool() {
|
|||
}
|
||||
|
||||
void NetworkManager::createNetworkParticipants() {
|
||||
|
||||
int numOfPEs = tp->processingElements.size();
|
||||
for (int j = 0; j < ROUTER_NO; ++j) { // Core index within each router
|
||||
}
|
||||
|
||||
for (Node &n : globalResources.nodes) {
|
||||
if (n.type->model == "Router") {
|
||||
int id = n.id;
|
||||
if (n.type->model == "ProcessingElement") {
|
||||
int id = (n.id-CORE_OFFSET)/CORE_NO;
|
||||
int j = (n.id-CORE_OFFSET)%CORE_NO;
|
||||
|
||||
for (int j = 0; j < CORE_NO; ++j) {
|
||||
int index = tlmNoc->cores[id][j]->source_core_id % numOfPEs;
|
||||
int index = tlmNoc->cores[id][j]->source_core_id % numOfPEs;
|
||||
|
||||
NetworkInterfaceTlm* ni = tlmNoc->cores[id][j];
|
||||
if (!ni) continue; // Ensure ni is valid
|
||||
NetworkInterfaceTlm* ni = tlmNoc->cores[id][j];
|
||||
if (!ni) continue; // Ensure ni is valid
|
||||
|
||||
std::string pe_name = "pe_" + std::to_string(n.id) + "_" + std::to_string(j);
|
||||
ProcessingElementVC *pe = new ProcessingElementVC(pe_name.c_str(), n, tp.get(), index);
|
||||
std::string pe_name = "pe_" + std::to_string(n.id) + "_" + std::to_string(j);
|
||||
ProcessingElementVC *pe = new ProcessingElementVC(pe_name.c_str(), n, tp.get(), index);
|
||||
|
||||
auto sig1 = std::make_unique<PacketSignalContainer>(
|
||||
("packetSigCon1_" + std::to_string(n.id) + "_" + std::to_string(j)).c_str());
|
||||
auto sig2 = std::make_unique<PacketSignalContainer>(
|
||||
("packetSigCon2_" + std::to_string(n.id) + "_" + std::to_string(j)).c_str());
|
||||
auto sig1 = std::make_unique<PacketSignalContainer>(
|
||||
("packetSigCon1_" + std::to_string(n.id) + "_" + std::to_string(j)).c_str());
|
||||
auto sig2 = std::make_unique<PacketSignalContainer>(
|
||||
("packetSigCon2_" + std::to_string(n.id) + "_" + std::to_string(j)).c_str());
|
||||
|
||||
ni->bind(nullptr, sig1.get(), sig2.get());
|
||||
pe->bind(nullptr, sig2.get(), sig1.get());
|
||||
ni->clk(*clocks.at(n.type->id));
|
||||
ni->bind(nullptr, sig1.get(), sig2.get());
|
||||
pe->bind(nullptr, sig2.get(), sig1.get());
|
||||
ni->clk(*clocks.at(n.type->id));
|
||||
|
||||
networkParticipants.push_back(dynamic_cast<NetworkParticipant *>(pe));
|
||||
packetSignalContainers.push_back(move(sig1));
|
||||
packetSignalContainers.push_back(move(sig2));
|
||||
networkParticipants.push_back(dynamic_cast<NetworkParticipant *>(pe));
|
||||
packetSignalContainers.push_back(move(sig1));
|
||||
packetSignalContainers.push_back(move(sig2));
|
||||
|
||||
if (index < tp->processingElements.size()) {
|
||||
tp->processingElements[index] = pe;
|
||||
}
|
||||
if (index < tp->processingElements.size()) {
|
||||
tp->processingElements[index] = pe;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ private:
|
|||
std::unique_ptr<TrafficPool> tp;
|
||||
NocTlm* tlmNoc;
|
||||
std::vector<NetworkParticipant*> networkParticipants;
|
||||
std::vector<int> idNis;
|
||||
std::vector<int> idNis;
|
||||
std::vector<std::unique_ptr<PacketSignalContainer>> packetSignalContainers;
|
||||
//std::vector<std::unique_ptr<Link>> links; ////
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ void NocTlm::setup_routers_and_cores() {
|
|||
std::string core_name = "core" + std::to_string(id) + "_" + std::to_string(j);
|
||||
cores[id][j] = new NetworkInterfaceTlm(core_name.c_str(), n);
|
||||
cores[id][j]->source_router_id = id; // Set source router ID
|
||||
cores[id][j]->source_core_id = CORE_NO*id + j; // Set source core ID
|
||||
cores[id][j]->source_core_id = CORE_NO*id + j + CORE_OFFSET; // Set source core ID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,8 +98,9 @@ void router::process_core_fifo() {
|
|||
//std::cout<<in_fifo.num_free()<<std::endl;
|
||||
// Decode the address to determine the destination router and core
|
||||
unsigned int address = payload->get_address();
|
||||
unsigned int destination_router_id = (address >> 12) & 0xF; // Extract router ID from address
|
||||
unsigned int destination_core_id = (address >> 8) & 0xF; // Extract core ID from address
|
||||
unsigned int destination_router_id = (address >> 16) & 0xF; // Extract router ID from address
|
||||
unsigned int destination_core_id = (address >> 8) & 0xFF; // Extract core ID from address
|
||||
std::cout<<"destination core id from address at source router:"<< destination_core_id<<std::endl;
|
||||
//blocking write to destination router
|
||||
|
||||
// Retry mechanism
|
||||
|
@ -107,7 +108,7 @@ void router::process_core_fifo() {
|
|||
while (!success) {
|
||||
|
||||
//wait(SC_ZERO_TIME);
|
||||
log_info("router id: " + std::to_string(current_router_id) + ", dest Router id: "+std::to_string(destination_router_id));
|
||||
log_info("router id: " + std::to_string(current_router_id) + ", dest Router id: "+ std::to_string(destination_router_id));
|
||||
if (sem_mgr->request_token(current_router_id, destination_router_id)) {
|
||||
|
||||
if (other_out_fifos[destination_router_id]->num_free() > 0) {
|
||||
|
@ -163,10 +164,12 @@ void router::process_router_receive_fifo() {
|
|||
|
||||
// Extract destination core ID from the address
|
||||
unsigned int address = payload->get_address();
|
||||
unsigned int destination_core_id = (address >> 8) & 0xF; // Core ID
|
||||
unsigned int dest_router_id = (address >> 12) & 0xF; // Extract router ID from address
|
||||
std::cout<<"address "<<address<<std::endl;
|
||||
unsigned int destination_core_id = (address >> 8) & 0xFF; // Core ID
|
||||
unsigned int dest_router_id = (address >> 16) & 0xF; // Extract router ID from address
|
||||
unsigned int src_router = payload->src_router;
|
||||
sc_core::sc_time timestamp = payload->timestamp;
|
||||
std::cout<<"destination core id from address at destination router:"<< destination_core_id<<std::endl;
|
||||
|
||||
// if (destination_core_id >= CORE_NO) {
|
||||
// log_error("Router " + std::string(name()) + ": Invalid destination core ID: " + std::to_string(destination_core_id));
|
||||
|
@ -185,7 +188,7 @@ void router::process_router_receive_fifo() {
|
|||
// wait(delay_T, SC_NS); // Simulate delay for receiving the data
|
||||
|
||||
log_info("Router " + std::to_string(dest_router_id)+ ": Received transaction with data: " + std::to_string(payload->data->id)
|
||||
+ " from Router " + std::to_string(payload->src_router) + " after a delay of:" + std::to_string(delay_T) + " ns" );
|
||||
+ " from Router " + std::to_string(src_router) + " after a delay of:" + std::to_string(delay_T) + " ns" );
|
||||
|
||||
prev_src_id = src_router;
|
||||
prev_timestamp = timestamp;
|
||||
|
|
|
@ -33,12 +33,13 @@
|
|||
using namespace sc_core; // For sc_time
|
||||
|
||||
// Global parameters to generalize the design
|
||||
#define ROUTER_NO 4 // Number of routers
|
||||
#define ROUTER_NO 8 // Number of routers
|
||||
#define CORE_NO 4 // Number of cores per router
|
||||
#define CORE_FIFO_CAPACITY 8 // Capacity of FIFO in router that receive data from cores
|
||||
#define ROUTER_RECEIVE_FIFO_CAPACITY 4 // Capacity of FIFO in router that receive data from other routers
|
||||
#define CORE_OFFSET 8 // To find the Router number, it is same as ROUTER_NO
|
||||
#define LOG_NAME "MY_LOG"
|
||||
#define NI_LOG "TLM_NI"
|
||||
#define NI_LOG "TLM_NI"
|
||||
|
||||
|
||||
struct my_payload : public tlm::tlm_generic_payload {
|
||||
|
|
Loading…
Reference in a new issue