Skip to content

Commit

Permalink
Merge pull request #17 from jkmingwen/master
Browse files Browse the repository at this point in the history
Resolve merge conflicts between TDMA and master branches
  • Loading branch information
bbodin authored Nov 26, 2021
2 parents 25eef63 + c601bfc commit a1b8288
Show file tree
Hide file tree
Showing 63 changed files with 3,030 additions and 1,108 deletions.
313 changes: 313 additions & 0 deletions benchmarks/NoCMotivation/lte_sdf_16.xml

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions benchmarks/tdma0.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<tdma slots='2'>
<rule id='48' slot='0'/>
<rule id='544' slot='0'/>
<rule id='33' slot='0'/>
<rule id='64' slot='0'/>
<rule id='36' slot='0'/>
<rule id='160' slot='0'/>
<rule id='180' slot='0'/>
<rule id='676' slot='0'/>
<rule id='165' slot='0'/>
<rule id='196' slot='0'/>
<rule id='168' slot='0'/>
<rule id='292' slot='0'/>
<rule id='312' slot='0'/>
<rule id='808' slot='0'/>
<rule id='297' slot='0'/>
<rule id='328' slot='0'/>
<rule id='300' slot='0'/>
<rule id='424' slot='0'/>
<rule id='444' slot='0'/>
<rule id='940' slot='0'/>
<rule id='429' slot='0'/>
<rule id='460' slot='0'/>
<rule id='81' slot='0'/>
<rule id='577' slot='0'/>
<rule id='66' slot='0'/>
<rule id='97' slot='0'/>
<rule id='69' slot='0'/>
<rule id='193' slot='0'/>
<rule id='213' slot='0'/>
<rule id='709' slot='0'/>
<rule id='198' slot='0'/>
<rule id='229' slot='0'/>
<rule id='201' slot='0'/>
<rule id='325' slot='0'/>
<rule id='345' slot='0'/>
<rule id='841' slot='0'/>
<rule id='330' slot='0'/>
<rule id='361' slot='0'/>
<rule id='333' slot='0'/>
<rule id='457' slot='0'/>
<rule id='477' slot='0'/>
<rule id='973' slot='0'/>
<rule id='462' slot='0'/>
<rule id='493' slot='0'/>
<rule id='114' slot='0'/>
<rule id='610' slot='0'/>
<rule id='99' slot='0'/>
<rule id='130' slot='0'/>
<rule id='102' slot='0'/>
<rule id='226' slot='0'/>
<rule id='246' slot='0'/>
<rule id='742' slot='0'/>
<rule id='231' slot='0'/>
<rule id='262' slot='0'/>
<rule id='234' slot='0'/>
<rule id='358' slot='0'/>
<rule id='378' slot='0'/>
<rule id='874' slot='0'/>
<rule id='363' slot='0'/>
<rule id='394' slot='0'/>
<rule id='366' slot='0'/>
<rule id='490' slot='0'/>
<rule id='510' slot='0'/>
<rule id='1006' slot='0'/>
<rule id='495' slot='0'/>
<rule id='526' slot='0'/>
<rule id='147' slot='0'/>
<rule id='643' slot='0'/>
<rule id='135' slot='0'/>
<rule id='259' slot='0'/>
<rule id='279' slot='0'/>
<rule id='775' slot='0'/>
<rule id='267' slot='0'/>
<rule id='391' slot='0'/>
<rule id='411' slot='0'/>
<rule id='907' slot='0'/>
<rule id='399' slot='0'/>
<rule id='523' slot='0'/>
<rule id='543' slot='0'/>
<rule id='742' slot='0'/>
<rule id='1039' slot='0'/>
</tdma>
83 changes: 83 additions & 0 deletions benchmarks/tdma1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<tdma slots='4'>
<rule id='48' slot='2'/>
<rule id='544' slot='3'/>
<rule id='33' slot='2'/>
<rule id='64' slot='1'/>
<rule id='36' slot='3'/>
<rule id='160' slot='2'/>
<rule id='180' slot='1'/>
<rule id='676' slot='0'/>
<rule id='165' slot='2'/>
<rule id='196' slot='0'/>
<rule id='168' slot='3'/>
<rule id='292' slot='2'/>
<rule id='312' slot='2'/>
<rule id='808' slot='1'/>
<rule id='297' slot='0'/>
<rule id='328' slot='0'/>
<rule id='300' slot='3'/>
<rule id='424' slot='2'/>
<rule id='444' slot='1'/>
<rule id='940' slot='3'/>
<rule id='429' slot='2'/>
<rule id='460' slot='2'/>
<rule id='81' slot='3'/>
<rule id='577' slot='3'/>
<rule id='66' slot='1'/>
<rule id='97' slot='1'/>
<rule id='69' slot='0'/>
<rule id='193' slot='1'/>
<rule id='213' slot='2'/>
<rule id='709' slot='3'/>
<rule id='198' slot='0'/>
<rule id='229' slot='2'/>
<rule id='201' slot='0'/>
<rule id='325' slot='3'/>
<rule id='345' slot='0'/>
<rule id='841' slot='1'/>
<rule id='330' slot='0'/>
<rule id='361' slot='2'/>
<rule id='333' slot='0'/>
<rule id='457' slot='2'/>
<rule id='477' slot='2'/>
<rule id='973' slot='0'/>
<rule id='462' slot='0'/>
<rule id='493' slot='3'/>
<rule id='114' slot='3'/>
<rule id='610' slot='3'/>
<rule id='99' slot='2'/>
<rule id='130' slot='3'/>
<rule id='102' slot='2'/>
<rule id='226' slot='0'/>
<rule id='246' slot='1'/>
<rule id='742' slot='0'/>
<rule id='231' slot='2'/>
<rule id='262' slot='1'/>
<rule id='234' slot='2'/>
<rule id='358' slot='3'/>
<rule id='378' slot='3'/>
<rule id='874' slot='1'/>
<rule id='363' slot='1'/>
<rule id='394' slot='2'/>
<rule id='366' slot='3'/>
<rule id='490' slot='1'/>
<rule id='510' slot='2'/>
<rule id='1006' slot='3'/>
<rule id='495' slot='1'/>
<rule id='526' slot='2'/>
<rule id='147' slot='2'/>
<rule id='643' slot='3'/>
<rule id='135' slot='2'/>
<rule id='259' slot='2'/>
<rule id='279' slot='1'/>
<rule id='775' slot='3'/>
<rule id='267' slot='2'/>
<rule id='391' slot='2'/>
<rule id='411' slot='0'/>
<rule id='907' slot='1'/>
<rule id='399' slot='1'/>
<rule id='523' slot='2'/>
<rule id='543' slot='3'/>
<rule id='1039' slot='0'/>
</tdma>
8 changes: 8 additions & 0 deletions benchmarks/tdma2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<tdma slots="2">
<rule slot="0" dest="2" src="1" id="0"/>
<rule slot="1" dest="4" src="1" id="1"/>
<rule slot="0" dest="3" src="2" id="2"/>
<rule slot="1" dest="1" src="3" id="3"/>
<rule slot="0" dest="3" src="4" id="4"/>
</tdma>
8 changes: 8 additions & 0 deletions benchmarks/tdma3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<tdma slots="3">
<rule id="0" src="1" dest="2" slot="1"/>
<rule id="1" src="1" dest="4" slot="3"/>
<rule id="2" src="2" dest="3" slot="0"/>
<rule id="3" src="3" dest="1" slot="2"/>
<rule id="4" src="4" dest="3" slot="1"/>
</tdma>
71 changes: 71 additions & 0 deletions benchmarks/tester.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0"?>
<sdf3 xsi:noNamespaceSchemaLocation="http://www.es.ele.tue.nl/sdf3/xsd/sdf3-sdf.xsd" type="sdf" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<applicationGraph>
<sdf type="Example" name="example">
<actor type="A" name="a">
<port type="out" name="p0" rate="2"/>
</actor>
<actor type="B" name="b">
<port type="in" name="p0" rate="3"/>
<port type="out" name="p1" rate="3"/>
</actor>
<actor type="C" name="c">
<port type="in" name="p0" rate="2"/>
</actor>
<channel name="ch0" dstPort="p0" dstActor="b" srcPort="p0" srcActor="a"/>

<channel name="ch1" dstPort="p0" dstActor="c" srcPort="p1" srcActor="b"/>

</sdf>


<sdfProperties>


<actorProperties actor="a">


<processor type="p1" default="true">

<executionTime time="1"/>

</processor>

</actorProperties>


<actorProperties actor="b">


<processor type="p1" default="true">

<executionTime time="1"/>

</processor>

</actorProperties>


<actorProperties actor="c">


<processor type="p1" default="true">

<executionTime time="1"/>

</processor>

</actorProperties>


<channelProperties channel="ch0"/>

<channelProperties channel="ch1"/>

<graphProperties/>

</sdfProperties>

</applicationGraph>

</sdf3>
14 changes: 1 addition & 13 deletions modules/FindGUROBI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
find_path(GUROBI_INCLUDE_DIR
NAMES gurobi_c++.h
PATHS "$ENV{GUROBI_HOME}/include"
"/opt/gurobi810/linux64/include"
"/opt/gurobi912/linux64/include"
"/Library/gurobi502/mac64/include"
"C:\\libs\\gurobi502\\include"
)

find_library( GUROBI_LIBRARY
Expand All @@ -32,19 +28,11 @@ find_library( GUROBI_LIBRARY
gurobi81
gurobi91
PATHS "$ENV{GUROBI_HOME}/lib"
"/opt/gurobi810/linux64/lib"
"/opt/gurobi912/linux64/lib"
"/Library/gurobi502/mac64/lib"
"C:\\libs\\gurobi502\\lib"
)

find_library( GUROBI_CXX_LIBRARY
NAMES gurobi_c++
PATHS "$ENV{GUROBI_HOME}/lib"
"/opt/gurobi810/linux64/lib"
"/opt/gurobi912/linux64/lib"
"/Library/gurobi502/mac64/lib"
"C:\\libs\\gurobi502\\lib"
)

set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
Expand All @@ -55,7 +43,7 @@ set(GUROBI_LIBRARIES "${GUROBI_CXX_LIBRARY};${GUROBI_LIBRARY}")
# set(GUROBI_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Gurobi Compiler Flags")

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# handle the QUIETLY and REQUIRED arguments and set GUROBI_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(GUROBI DEFAULT_MSG
GUROBI_LIBRARY GUROBI_CXX_LIBRARY GUROBI_INCLUDE_DIR)
Expand Down
32 changes: 32 additions & 0 deletions runres.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
if [ $1 = "0" ]
then
echo "Calculating Summarized Results"
for f in benchmarks/ascenttestbench/*.xml
do
ped="$(./Debug/bin/kiter -f "$f" -a SPeriodicScheduling | grep -P "(?:period\s+is\s+)\K\d+" -o)"
echo "period of $ped for $f"
echo "$f :" >> runres.txt
for a in ASAPScheduling So4Scheduling
do
rr="$(./Debug/bin/kiter -f "$f" -a createNoC -a randomMapping -a randomRouting -a AddVBuffers -a "$a" -p TDMA=benchmarks/fbf.txt -p PERIOD="$ped" | grep -P "(?:throughput\s+is\s+)\K\d+.\d+" -o)"
rxy="$(./Debug/bin/kiter -f "$f" -a createNoC -a randomMapping -a xyRouting -a AddVBuffers -a "$a" -p TDMA=benchmarks/fbf.txt -p PERIOD="$ped" | grep -P "(?:throughput\s+is\s+)\K\d+.\d+" -o)"
b="$(./Debug/bin/kiter -f "$f" -a createNoC -a BufferlessNoCMapAndRoute -a AddVBuffers -a "$a" -p TDMA=benchmarks/fbf.txt -p PERIOD="$ped" | grep -P "(?:throughput\s+is\s+)\K\d+.\d+" -o)"
echo "$a threshold : randomRoute = $rr xyRoute = $rxy bufferlessMR = $b"
echo "$a : $rr , $rxy, $b" >> runres.txt
done
done
fi
if [ $1 = "1" ]
then
echo "Store Entire Output Log"
for f in benchmarks/ascenttestbench/*.xml
do
ped="$(./Debug/bin/kiter -f "$f" -a SPeriodicScheduling | grep -P "(?:period\s+is\s+)\K\d+" -o)"
for a in ASAPScheduling So4Scheduling
do
echo "$(./Debug/bin/kiter -f "$f" -a createNoC -a randomMapping -a randomRouting -a AddVBuffers -a "$a" -p TDMA=benchmark/fbf.txt -p PERIOD="$ped" >> runres.txt
echo "$(./Debug/bin/kiter -f "$f" -a createNoC -a randomMapping -a xyRouting -a AddVBuffers -a "$a" -p TDMA=benchmark/fbf.txt -p PERIOD="$ped" >> runres.txt
echo "$(./Debug/bin/kiter -f "$f" -a createNoC -a BufferlessNoCMapAndRoute -a AddVBuffers -a "$a" -p TDMA=benchmark/fbf.txt -p PERIOD="$ped" >> runres.txt
fi
15 changes: 15 additions & 0 deletions runres.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
benchmarks/ascenttestbench/one_h263decoder.xml :
ASAPScheduling : 0.0001 , 0.0001, 0.0001
So4Scheduling : 2.11703 , 2.11703, 2.11703
benchmarks/ascenttestbench/one_modem.xml :
ASAPScheduling : 0.0625 , 0.0625, 0.0625
So4Scheduling : 0.00420168 , 0.00420168, 0.00446429
benchmarks/ascenttestbench/one_mp3decoder.xml :
ASAPScheduling : 0.00757576 , 0.00757576, 0.00757576
So4Scheduling : 0.00297619 , 0.00297619, 0.00297619
benchmarks/ascenttestbench/one_samplerate.xml :
ASAPScheduling : 0.00104167 , 0.00104167, 0.00104167
So4Scheduling : 0.000341763 , 0.000341763, 0.000340136
benchmarks/ascenttestbench/one_satellite.xml :
ASAPScheduling : 0.00094697 , 0.00094697, 0.00094697
So4Scheduling : 0.000135281 , 0.000135281, 0.000135281
6 changes: 2 additions & 4 deletions src/libkiter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ TARGET_LINK_LIBRARIES (libkiter PUBLIC
if(GUROBI_FOUND)
message(STATUS "GUROBI FOUND")

ADD_LIBRARY (kiter_gurobi_lp STATIC ${lp_sources})
TARGET_LINK_LIBRARIES (kiter_gurobi_lp PUBLIC kiter_commons )


ADD_LIBRARY (kiter_gurobi_lp STATIC ${lp_sources})
TARGET_LINK_LIBRARIES (kiter_gurobi_lp PUBLIC kiter_commons )
target_include_directories(kiter_gurobi_lp PUBLIC ${GUROBI_INCLUDE_DIRS})

if(GLPK_FOUND)
Expand Down
5 changes: 5 additions & 0 deletions src/libkiter/algorithms/buffersizing.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ class BufferSizingResult {

bool _valid;
TOKEN_UNIT _total_size;
std::map<ARRAY_INDEX, double> _idv_size;
public:
BufferSizingResult(TOKEN_UNIT t) : _valid (true), _total_size(t) {}
BufferSizingResult() : _valid (false), _total_size(0) {}
bool is_valid() const {return _valid;}
TOKEN_UNIT total_size() const {return _total_size;}
void set_validity(bool validity){_valid = validity;}
void set_total_size(TOKEN_UNIT token){_total_size = token;}
void add_edge_size(ARRAY_INDEX edge, double size) {_idv_size.insert({edge, size});}
double get_edge_size (ARRAY_INDEX edge) {return _idv_size[edge];}
};

typedef std::function< BufferSizingResult(models::Dataflow* const, TIME_UNIT) > BufferSizingFun;
Expand Down
Loading

0 comments on commit a1b8288

Please sign in to comment.