URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc
Compare Revisions
- This comparison shows the changes necessary to convert path
/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk/mpsoc/script
- from Rev 32 to Rev 34
- ↔ Reverse comparison
Rev 32 → Rev 34
/verilator_multiple/pronoc/pronoc.sh
0,0 → 1,425
#!/bin/sh |
#set -e |
# Any subsequent commands which fail will cause the shell script to exit immediately |
|
#my_dir="$(dirname "$0")" |
#source "$my_dir/../parameter.sh" |
|
cc=$(pwd) |
PWDI=$cc |
echo "$PWD " |
|
script_path=$PWDI/../.. |
path=$script_path/.. |
comp_path=$path/../mpsoc_work/verilator |
work_path=$comp_path/work |
bin_path=$work_path/bin |
multiple_path=$work_path/pronoc |
data_path=$multiple_path/data |
plot_path=$multiple_path/plot |
src_c_path=$path/src_c |
src_noc_path=$path/src_noc |
src_verilator_path=$path/src_verilator |
plot_c_path=$src_c_path/plot |
|
source "$script_path/parameter.sh" |
|
rm -Rf $multiple_path |
mkdir -p $data_path |
mkdir -p $plot_path |
cp $path/src_c/plot/plot $multiple_path/plot_bin |
|
|
#commen parameter |
V=2 # number of VC per port |
NX=8 # number of node in x axis |
NY=8 # number of node in y axis |
CONGESTION_INDEX=3 |
B=4 # buffer space :flit per VC |
ESCAP_VC_MASK="2'b01" # mask scape vc |
C=0 # number of flit class |
COMBINATION_TYPE="COMB_NONSPEC" # "BASELINE" or "COMB_SPEC1" or "COMB_SPEC2" or "COMB_NONSPEC" |
AVC_ATOMIC_EN=0 |
FIRST_ARBITER_EXT_P_EN=0 |
TOPOLOGY="MESH" #"MESH" or "TORUS" |
CLASS_SETTING="4'b1111" #There are total of two classes. each class use half of avb VCs |
|
#simulation parameters: |
C0_p=50 # the percentage of injected packets with class 0 |
C1_p=50 |
C2_p=0 |
C3_p=0 |
|
|
|
# Simulation parameters: |
|
#Hotspot Traffic setting |
HOTSPOT_PERCENTAGE=4 #maximum 20 |
HOTSOPT_NUM=4 #maximum 5 |
HOTSPOT_CORE_1=$(CORE_NUM 2 3) |
HOTSPOT_CORE_2=$(CORE_NUM 4 6) |
HOTSPOT_CORE_3=$(CORE_NUM 6 2) |
HOTSPOT_CORE_4=$(CORE_NUM 6 6) |
|
|
|
|
|
MAX_PCK_NUM=200000 |
MAX_SIM_CLKs=100000 |
MAX_PCK_SIZ=10 # maximum flit number in a single packet |
TIMSTMP_FIFO_NUM=16 |
|
PACKET_SIZE=4 |
|
|
DEBUG_EN=0 |
|
|
|
|
|
|
|
# |
|
AVC_ATOMIC_EN=0 |
STND_DEV_EN=0 # 1: generate standard devision |
|
|
|
|
|
|
|
|
###################### |
# |
# verilator_compile_hw |
# |
###################### |
|
verilator_compile_hw(){ |
|
|
|
work_path=$comp_path/work |
#echo "$work_path\n" |
cd $script_path |
mkdir -p $work_path/rtl_work |
|
cp split $work_path/split |
|
|
cd $work_path |
|
# remove old files |
rm -rf rtl_work/* |
rm -rf processed_rtl/* |
rm -rf processed_rtl/obj_dir/* |
|
|
|
echo "copy all verilog files in rtl_work folder" |
find $src_noc_path -name \*.v -exec cp '{}' rtl_work/ \; |
find $src_verilator_path -name \*.v -exec cp '{}' rtl_work/ \; |
|
#replace conventional |
if [ "$routename" == "DUATO_ORG" ] |
then |
cp -f $PWDI/vc_alloc_request_gen.v rtl_work/vc_alloc_request_gen.v |
|
echo "$PWDI vc_alloc_request_gen.v have been replaced" |
fi |
|
|
echo "split all verilog modules in separate files" |
./split > foo |
|
find $src_verilator_path -name \*.sv -exec cp '{}' processed_rtl/ \; |
|
|
cd processed_rtl |
|
verilator --cc router_verilator.v --profile-cfuncs --prefix "Vrouter" -O3 |
verilator --cc noc_connection.sv --prefix "Vnoc" -O3 |
verilator --cc --profile-cfuncs traffic_gen_verilator.v --prefix "Vtraffic" -O3 |
|
|
cp $script_path/Makefile obj_dir/ |
cd obj_dir |
make lib -j 4 |
cd $script_path |
|
|
} |
|
|
|
|
################ |
# |
# regenerate_NoC |
# |
################ |
|
regenerate_NoC() { |
generate_parameter_v |
mv -f parameter.v $src_verilator_path/ |
|
#verilate the NoC and make the library files |
#################################################################3 |
verilator_compile_hw |
|
# compile the testbench file |
generate_parameter_h |
mv -f parameter.h $src_verilator_path/ |
|
./verilator_compile_sw.sh |
|
|
cp $bin_path/testbench $multiple_path/$testbench_name |
} |
|
routename="NULL" |
################ |
# |
# merg_files |
# |
################ |
|
|
merg_files(){ |
|
data_file=$data_path/$plot_name"_all.txt" |
plot_file=$plot_path/$plot_name"_all.eps" |
|
printf "#name:"$CURVE_NAME"\n" >> $data_file |
cat $testbench_name"_all.txt" >> $data_file |
printf "\n\n" >> $data_file |
|
./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "left" |
|
|
|
if [ $C -gt 1 ] |
then |
|
data_file=$data_path/$plot_name"_c0.txt" |
plot_file=$plot_path/$plot_name"_c0.eps" |
|
|
printf "#name:"$CURVE_NAME"\n" >> $data_file |
cat $testbench_name"_c0.txt" >> $data_file |
printf "\n\n" >> $data_file |
|
./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "left" |
|
data_file=$data_path/$plot_name"_c1.txt" |
plot_file=$plot_path/$plot_name"_c1.eps" |
|
|
printf "#name:"$CURVE_NAME"\n" >> $data_file |
cat $testbench_name"_c1.txt" >> $data_file |
printf "\n\n" >> $data_file |
|
./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "left" |
|
fi |
|
|
rm $testbench_name* |
|
} |
|
|
|
|
####################### |
# |
# generate_plot_command_h |
####################### |
|
generate_plot_command(){ |
|
rm -f plot_command.h |
|
cat > plot_command.h << EOF |
#ifndef PLOT_COMMAND_H |
#define PLOT_COMMAND_H |
|
char * commandsForGnuplot[] = { |
"set terminal postscript eps enhanced color font 'Helvetica,15'", |
"set output 'temp.eps' ", |
"set style line 1 lc rgb \"red\" lt 1 lw 2 pt 4 ps 1.5", |
"set style line 2 lc rgb \"blue\" lt 1 lw 2 pt 6 ps 1.5", |
"set style line 3 lc rgb \"green\" lt 1 lw 2 pt 10 ps 1.5", |
"set style line 4 lc rgb '#8B008B' lt 1 lw 2 pt 14 ps 1.5",//darkmagenta |
"set style line 5 lc rgb '#B8860B' lt 1 lw 2 pt 2 ps 1.5", //darkgoldenrod |
"set style line 6 lc rgb \"gold\" lt 1 lw 2 pt 3 ps 1.5", |
"set style line 7 lc rgb '#FF8C00' lt 1 lw 2 pt 10 ps 1.5",//darkorange |
"set style line 8 lc rgb \"black\" lt 1 lw 2 pt 1 ps 1.5", |
"set style line 9 lc rgb \"spring-green\" lt 1 lw 2 pt 8 ps 1.5", |
"set style line 10 lc rgb \"yellow4\" lt 1 lw 2 pt 0 ps 1.5", |
"set yrange [0:80]", |
"set xrange [0:]", |
|
0 |
}; |
|
#endif |
|
EOF |
|
mv -f plot_command.h $plot_c_path/plot_command.h |
cd $plot_c_path |
make |
cp $plot_c_path/plot $multiple_path/plot_bin |
cd $script_path |
|
} |
|
|
|
gen_testbench_name(){ |
testbench_name="B"$B"_"$routename"_"$TRAFFIC"_"$PACKET_SIZE |
|
} |
|
gen_plot_name(){ |
plot_name="B"$B"_"$TRAFFIC"_"$PACKET_SIZE |
|
} |
|
|
route_setting(){ |
case $routename in |
|
|
|
'DUATO_ORG') |
ROUTE_NAME="DUATO" |
ROUTE_SUBFUNC="XY" |
VC_REALLOCATION_TYPE="ATOMIC" |
AVC_ATOMIC_EN=1 |
echo "DUATO_ORG" |
;; |
'DUATO_WPF') |
ROUTE_NAME="DUATO" |
ROUTE_SUBFUNC="XY" |
VC_REALLOCATION_TYPE="NONATOMIC" |
AVC_ATOMIC_EN=1 |
echo "DUATO_WPF" |
|
;; |
'DUATO_MINE') |
ROUTE_NAME="DUATO" |
ROUTE_SUBFUNC="XY" |
VC_REALLOCATION_TYPE="NONATOMIC" |
AVC_ATOMIC_EN=0 |
echo "DUATO_MINE" |
;; |
|
|
|
*) |
ROUTE_NAME=$routename |
VC_REALLOCATION_TYPE="NONATOMIC" |
AVC_ATOMIC_EN=0 |
echo $ROUTE_NAME |
;; |
|
|
esac |
} |
|
|
|
|
|
|
################ |
# |
# run_sim |
# |
################ |
run_sim(){ |
|
for routename in "DUATO_ORG" "DUATO_MINE" "DUATO_WPF" "XY" "WEST_FIRST" "ODD_EVEN" "NEGETIVE_FIRST" |
do |
route_setting |
gen_testbench_name |
regenerate_NoC |
done |
|
|
|
|
|
cd $multiple_path |
|
for routename in "XY" "WEST_FIRST" "ODD_EVEN" "NEGETIVE_FIRST" |
do |
route_setting |
gen_testbench_name |
CMD="./$testbench_name $testbench_name" |
|
command $CMD & |
done |
|
|
# wait for all simulation to be done |
wait |
|
for routename in "DUATO_ORG" "DUATO_MINE" "DUATO_WPF" |
do |
route_setting |
gen_testbench_name |
CMD="./$testbench_name $testbench_name" |
|
command $CMD & |
done |
|
|
# wait for all simulation to be done |
wait |
|
|
# merge the results in one file |
VC_REALLOCATION_TYPE="NONATOMIC" |
|
for routename in "XY" "WEST_FIRST" "ODD_EVEN" "NEGETIVE_FIRST" "DUATO_ORG" "DUATO_MINE" "DUATO_WPF" |
do |
|
route_setting |
gen_testbench_name |
gen_plot_name |
CURVE_NAME=$routename |
merg_files |
done # ROUTE_NAME |
|
|
cd $script_path |
|
} |
|
generate_plot_command |
|
for B in 8 |
do |
for PACKET_SIZE in 2 8 |
do |
for TRAFFIC in "TRANSPOSE2" "TRANSPOSE1" "BIT_REVERSE" "RANDOM" "HOTSPOT" |
do |
for CONGESTION_INDEX in 12 #0 1 2 3 |
do |
|
run_sim |
|
done |
done |
done #PACKET_SIZE |
|
done |
|
verilator_multiple/pronoc/pronoc.sh
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: verilator_multiple/pronoc/verilator_ssa.sh
===================================================================
--- verilator_multiple/pronoc/verilator_ssa.sh (nonexistent)
+++ verilator_multiple/pronoc/verilator_ssa.sh (revision 34)
@@ -0,0 +1,304 @@
+#!/bin/sh
+set -e
+# Any subsequent commands which fail will cause the shell script to exit immediately
+
+my_dir="$(dirname "$0")"
+source "$my_dir/../parameter.sh"
+
+
+cd ..
+script_path=$(pwd)
+path=$script_path/..
+comp_path=$path/../mpsoc_work/verilator
+work_path=$comp_path/work
+bin_path=$work_path/bin
+multiple_path=$work_path/ssa4
+data_path=$multiple_path/data
+plot_path=$multiple_path/plot
+src_c_path=$path/src_c
+plot_c_path=$src_c_path/plot
+
+rm -Rf $multiple_path
+mkdir -p $data_path
+mkdir -p $plot_path
+
+#cp $path/src_c/plot/plot $multiple_path/plot_bin
+
+
+
+ V=4 # number of VC per port
+ B=5 # buffer space :flit per VC
+ NX=8 # number of node in x axis
+ NY=8 # number of node in y axis
+ C=4 # number of flit class
+ COMBINATION_TYPE="COMB_NONSPEC" # "BASELINE" or "COMB_SPEC1" or "COMB_SPEC2" or "COMB_NONSPEC"
+ FIRST_ARBITER_EXT_P_EN=0
+ ROUTE_NAME="XY"
+ CLASS_SETTING="16'b111111111111111"
+
+#simulation parameters:
+ C0_p=25 # the percentage of injected packets with class 0
+ C1_p=25
+ C2_p=25
+ C3_p=25
+
+
+
+ # Simulation parameters:
+
+ #Hotspot Traffic setting
+ HOTSPOT_PERCENTAGE=3 #maximum 20
+ HOTSOPT_NUM=4 #maximum 5
+ HOTSPOT_CORE_1=$(CORE_NUM 2 2)
+ HOTSPOT_CORE_2=$(CORE_NUM 2 6)
+ HOTSPOT_CORE_3=$(CORE_NUM 6 2)
+ HOTSPOT_CORE_4=$(CORE_NUM 6 6)
+
+
+
+
+
+ MAX_PCK_NUM=256000
+ MAX_SIM_CLKs=100000
+ MAX_PCK_SIZ=10 # maximum flit number in a single packet
+
+
+
+
+ ESCAP_VC_MASK="4'b0001" # mask scape vc
+ DEBUG_EN=1
+
+ CONGESTION_INDEX=3 # 0: packets are routed to the ports with more available VCs
+ # 1: packets are routed to the ports with more available credits
+ # 2: packets are routed to the ports connected to the routers with less active ivc requests
+ # 3: packets are routed to the ports connected to the routers with less active ivc requests that are not granted
+
+
+
+
+
+
+#
+
+ AVC_ATOMIC_EN=0
+ STND_DEV_EN=0 # 1: generate standard devision
+ TIMSTMP_FIFO_NUM=8
+
+
+
+
+generate_plot_command(){
+
+rm -f plot_command.h
+
+cat > plot_command.h << EOF
+#ifndef PLOT_COMMAND_H
+ #define PLOT_COMMAND_H
+
+char * commandsForGnuplot[] = {
+ "set terminal postscript eps enhanced color font 'Helvetica,15'",
+ "set output 'temp.eps' ",
+ "set style line 1 lc rgb \"red\" lt 1 lw 2 pt 4 ps 1.5",
+ "set style line 2 lc rgb \"blue\" lt 1 lw 2 pt 6 ps 1.5",
+ "set style line 3 lc rgb \"green\" lt 1 lw 2 pt 10 ps 1.5",
+ "set style line 4 lc rgb '#8B008B' lt 1 lw 2 pt 14 ps 1.5",//darkmagenta
+ "set style line 5 lc rgb '#B8860B' lt 1 lw 2 pt 2 ps 1.5", //darkgoldenrod
+ "set style line 6 lc rgb \"gold\" lt 1 lw 2 pt 3 ps 1.5",
+ "set style line 7 lc rgb '#FF8C00' lt 1 lw 2 pt 10 ps 1.5",//darkorange
+ "set style line 8 lc rgb \"black\" lt 1 lw 2 pt 1 ps 1.5",
+ "set style line 9 lc rgb \"spring-green\" lt 1 lw 2 pt 8 ps 1.5",
+ "set style line 10 lc rgb \"yellow4\" lt 1 lw 2 pt 0 ps 1.5",
+ "set yrange [0:45]",
+ "set xrange [0:]",
+
+ 0
+};
+
+#endif
+
+EOF
+
+ mv -f plot_command.h $plot_c_path/plot_command.h
+ cd $plot_c_path
+ make
+ cp $plot_c_path/plot $multiple_path/plot_bin
+ cd $script_path
+
+}
+
+
+
+
+################
+#
+# regenerate_NoC
+#
+################
+
+regenerate_NoC() {
+ generate_parameter_v
+ mv -f parameter.v ../src_verilator/
+
+ #verilate the NoC and make the library files
+#################################################################3
+ ./verilator_compile_hw.sh
+
+ # compile the testbench file
+ generate_parameter_h
+ mv -f parameter.h ../src_verilator/
+
+ ./verilator_compile_sw.sh
+
+
+ cp $bin_path/testbench $multiple_path/$testbench_name
+}
+
+
+################
+#
+# merg_files
+#
+################
+
+
+merg_files(){
+ if [ $STND_DEV_EN -eq 1 ]
+ then
+
+ target="_std"
+ else
+ target="_all"
+
+ fi
+
+ data_file=$data_path/${plot_name}${target}".txt"
+ plot_file=$plot_path/${plot_name}${target}".eps"
+
+ printf "#name:"$CURVE_NAME"\n" >> $data_file
+ cat ${testbench_name}${target}".txt" >> $data_file
+ printf "\n\n" >> $data_file
+
+ ./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "outside left"
+
+
+
+ if [ $C -gt 1 ]
+ then
+
+ data_file=$data_path/$plot_name"_c0.txt"
+ plot_file=$plot_path/$plot_name"_c0.eps"
+
+
+ printf "#name:"$CURVE_NAME"\n" >> $data_file
+ cat $testbench_name"_c0.txt" >> $data_file
+ printf "\n\n" >> $data_file
+
+ ./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "outside left"
+
+ data_file=$data_path/$plot_name"_c1.txt"
+ plot_file=$plot_path/$plot_name"_c1.eps"
+
+
+ printf "#name:"$CURVE_NAME"\n" >> $data_file
+ cat $testbench_name"_c1.txt" >> $data_file
+ printf "\n\n" >> $data_file
+
+ ./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "outside left"
+
+ fi
+
+
+ rm $testbench_name*
+
+}
+
+gen_testbench_name(){
+ testbench_name=$routename"_"$SSA_EN
+
+}
+
+gen_plot_name(){
+ plot_name=$routename"_"$TRAFFIC"_"$PACKET_SIZE
+
+}
+
+
+
+
+
+
+
+
+################
+#
+# run_sim
+#
+################
+run_sim(){
+
+ for SSA_EN in "YES" "NO"
+ do
+
+ gen_testbench_name
+ regenerate_NoC
+ done
+
+
+
+
+
+ cd $multiple_path
+
+ for SSA_EN in "YES" "NO"
+ do
+
+ gen_testbench_name
+ CMD="./$testbench_name $testbench_name"
+
+ command $CMD &
+ done
+
+
+ # wait for all simulation to be done
+ wait
+
+
+
+ # merge the results in one file
+ VC_REALLOCATION_TYPE="NONATOMIC"
+
+ for SSA_EN in "YES" "NO"
+ do
+
+
+ gen_testbench_name
+ gen_plot_name
+ CURVE_NAME=$SSA_EN
+ merg_files
+ done # ROUTE_NAME
+
+
+ cd $script_path
+
+}
+
+
+generate_plot_command
+
+
+
+
+
+
+ for PACKET_SIZE in 4 # 6
+ do
+ for TRAFFIC in "HOTSPOT" "RANDOM" "TORNADO" # "BIT_REVERSE" "BIT_COMPLEMENT" "RANDOM" "TRANSPOSE1" #"CUSTOM"
+ do
+
+
+ run_sim
+
+
+ done
+done #PACKET_SIZE
+
verilator_multiple/pronoc/verilator_ssa.sh
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: verilator_multiple/ptonoc-vcsw.sh
===================================================================
--- verilator_multiple/ptonoc-vcsw.sh (nonexistent)
+++ verilator_multiple/ptonoc-vcsw.sh (revision 34)
@@ -0,0 +1,295 @@
+#!/bin/sh
+set -e
+# Any subsequent commands which fail will cause the shell script to exit immediately
+
+my_dir="$(dirname "$0")"
+source "$my_dir/../parameter.sh"
+
+# change default parameters
+ V=4 #if change u need to change CLASS_SETTING as well
+ FIRST_ARBITER_EXT_P_EN=0
+ ROUTE_NAME="XY"
+ TRAFFIC="TRANSPOSE1"
+ DEBUG_EN=1
+ STND_DEV_EN=0
+ B=4
+ VC_REALLOCATION_TYPE="NONATOMIC"
+ MAX_PCK_NUM=128000
+ NX=4 # number of node in x axis
+ NY=4 # number of node in y axis
+
+
+
+cd ..
+script_path=$(pwd)
+path=$script_path/..
+comp_path=$path/../mpsoc_work/verilator
+work_path=$comp_path/work
+bin_path=$work_path/bin
+multiple_path=$work_path/sw_vc_comb
+data_path=$multiple_path/data
+plot_path=$multiple_path/plot
+src_c_path=$path/src_c
+src_verilator_path=$path/src_verilator
+plot_c_path=$src_c_path/plot
+rm -Rf $multiple_path
+mkdir -p $data_path
+mkdir -p $plot_path
+
+
+
+
+
+
+CLASS_CONFIG=0
+
+
+
+
+
+################
+#
+# regenerate_NoC
+#
+################
+
+regenerate_NoC() {
+ rm -f parameter.v
+ generate_parameter_v
+ mv -f parameter.v $src_verilator_path/
+ cd $script_path
+ #verilate the NoC and make the library files
+
+ ./verilator_compile_hw.sh
+
+ # compile the testbench file
+ generate_parameter_h
+ mv -f parameter.h $src_verilator_path/
+
+ ./verilator_compile_sw.sh
+
+
+ cp $bin_path/testbench $multiple_path/$testbench_name
+}
+
+###############
+# set packet classes
+#
+###############
+
+
+class_setting(){
+ if [ $CLASS_CONFIG -eq 0 ]
+ then
+ C=1
+ C0_p=100
+ CLASS_SETTING="4'b1111"
+ elif [ $CLASS_CONFIG -eq 1 ]
+ then
+ C=$V
+ C0_p=$(expr 100 / $V )
+ C1_p=$(expr 100 / $V )
+ C2_p=$(expr 100 / $V )
+ C3_p=$(expr 100 / $V )
+ CLASS_SETTING="16'b1000010000100001"
+
+
+ elif [ $CLASS_CONFIG -eq 3 ]
+ then
+ C=2
+ C0_p=50
+ C1_p=50
+ CLASS_SETTING="8'b11001111"
+
+ elif [ $CLASS_CONFIG -eq 4 ]
+ then
+ C=2
+ C0_p=50
+ C1_p=50
+ CLASS_SETTING="8'b11000011"
+ else
+ C=2
+ C0_p=50
+ C1_p=50
+
+ fi
+
+}
+
+
+#######################
+#
+# generate_plot_command_h
+#######################
+
+generate_plot_command(){
+
+rm -f plot_command.h
+
+cat > plot_command.h << EOF
+#ifndef PLOT_COMMAND_H
+ #define PLOT_COMMAND_H
+
+char * commandsForGnuplot[] = {
+ "set terminal postscript eps enhanced color font 'Helvetica,24'",
+ "set output 'temp.eps' ",
+ "set style line 1 lc rgb \"red\" lt 1 lw 2 pt 4 ps 1.5",
+ "set style line 2 lc rgb \"blue\" lt 1 lw 2 pt 6 ps 1.5",
+ "set style line 3 lc rgb \"green\" lt 1 lw 2 pt 10 ps 1.5",
+ "set style line 4 lc rgb '#8B008B' lt 1 lw 2 pt 14 ps 1.5",//darkmagenta
+ "set style line 5 lc rgb '#B8860B' lt 1 lw 2 pt 2 ps 1.5", //darkgoldenrod
+ "set style line 6 lc rgb \"gold\" lt 1 lw 2 pt 3 ps 1.5",
+ "set style line 7 lc rgb '#FF8C00' lt 1 lw 2 pt 10 ps 1.5",//darkorange
+ "set style line 8 lc rgb \"black\" lt 1 lw 2 pt 1 ps 1.5",
+ "set style line 9 lc rgb \"spring-green\" lt 1 lw 2 pt 8 ps 1.5",
+ "set style line 10 lc rgb \"yellow4\" lt 1 lw 2 pt 0 ps 1.5",
+ "set yrange [0:60]",
+ "set xrange [0:]",
+ 0
+};
+
+#endif
+
+EOF
+
+ mv -f plot_command.h $plot_c_path/plot_command.h
+ cd $plot_c_path
+ make
+ cp $plot_c_path/plot $multiple_path/plot_bin
+ cd $path
+}
+
+
+
+#############
+# plot_file
+#
+############
+
+plot_file (){
+ data_file=$data_path/$plot_name$ext".txt"
+ plot_file=$plot_path/$plot_name$ext".eps"
+ printf "#name:"$CURVE_NAME"\n" >> $data_file
+ cat $testbench_name$ext".txt" >> $data_file
+ printf "\n\n" >> $data_file
+ ./plot_bin $data_file $plot_file "Injection ratio flits/node/clk" "Average latency clk" "left"
+}
+
+
+################
+#
+# merg_files
+#
+################
+
+
+merg_files(){
+
+ ext="_all"
+ plot_file
+
+
+ if [ $STND_DEV_EN -eq 1 ]
+ then
+ ext="_std"
+ plot_file
+ fi
+
+ if [ $CLASS_CONFIG -eq 3 ]
+ then
+ ext="_c0"
+ plot_file
+
+ ext="_c1"
+ plot_file
+
+ if [ $STND_DEV_EN -eq 1 ]
+ then
+ ext="_std0"
+ plot_file
+
+ ext="_std1"
+ plot_file
+ fi
+
+
+ fi
+
+
+ rm $testbench_name*
+
+}
+
+gen_testbench_name(){
+ testbench_name=$VC_REALLOCATION_TYPE"_"$COMBINATION_TYPE"_Config"$CLASS_CONFIG"_P"$PACKET_SIZE
+
+}
+
+gen_plot_name(){
+ plot_name=$VC_REALLOCATION_TYPE"_Config"$CLASS_CONFIG"_P"$PACKET_SIZE
+
+}
+
+################
+#
+# run_sim
+#
+################
+run_sim(){
+
+ for COMBINATION_TYPE in "BASELINE" "COMB_SPEC1" "COMB_SPEC2" "COMB_NONSPEC"
+ do
+ gen_testbench_name
+ regenerate_NoC
+ done
+
+ cd $multiple_path
+
+ for COMBINATION_TYPE in "BASELINE" "COMB_SPEC1" "COMB_SPEC2" "COMB_NONSPEC"
+ do
+ gen_testbench_name
+ CMD="./$testbench_name $testbench_name"
+
+ command $CMD &
+ done
+
+ # wait for all simulation to be done
+ wait
+
+ # merge the results in one file
+ for COMBINATION_TYPE in "BASELINE" "COMB_SPEC1" "COMB_SPEC2" "COMB_NONSPEC"
+ do
+ gen_testbench_name
+ gen_plot_name
+ CURVE_NAME=$COMBINATION_TYPE
+ merg_files
+ done #COMBINATION_TYPE
+
+
+
+ cd $script_path
+
+}
+
+###############
+# main
+##############
+
+
+generate_plot_command
+
+ for PACKET_SIZE in 2 4
+ do
+ for CLASS_CONFIG in 4
+ do
+ class_setting
+ run_sim
+ #teset
+
+
+
+
+
+ done # CLASS_CONFIG
+done #PACKET_SIZE
+
verilator_multiple/ptonoc-vcsw.sh
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: verilator_soc_make
===================================================================
--- verilator_soc_make (nonexistent)
+++ verilator_soc_make (revision 34)
@@ -0,0 +1,36 @@
+# -*- Makefile -*-
+
+
+default: sim
+
+MUDUL = Vtop
+
+
+include Vtop.mk
+
+lib:
+ $(MAKE) -f $(MUDUL).mk
+
+
+
+##################################
+# Compile flags
+
+CPPFLAGS += -DVL_DEBUG=1
+ifeq ($(CFG_WITH_CCWARN),yes) # Local... Else don't burden users
+CPPFLAGS += -DVL_THREADED=1
+CPPFLAGS += -W -Werror -Wall
+endif
+##############################
+# Linking final exe -- presumes have a testbench.cpp
+
+
+sim: testbench.o $(VK_GLOBAL_OBJS) $(MUDUL)__ALL.a
+ $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o testbench $(LIBS) -Wall -O3 2>&1 | c++filt
+
+testbench.o: testbench.cpp $(MUDUL).h
+
+clean:
+ rm *.o *.a testbench
+
+