source: trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/gen_config.sh @ 134

Last change on this file since 134 was 134, checked in by kane, 13 years ago

add multi write buffer in cc_xcache_v4

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1#!/bin/bash
2
3#               archi1  archi2  archi3  archi4
4archi_name=(    "00512" "16384" "01024" "02048");
5iways=(         "1"     "4"     "16"    "4"    );
6isets=(         "8"     "64"    "1"     "8"    );
7iwords=(        "16"    "16"    "16"    "16"   );
8dways=(         "1"     "4"     "16"    "4"    );
9dsets=(         "8"     "64"    "1"     "8"    );
10dwords=(        "16"    "16"    "16"    "16"   );
11memc_nways=(    "4"     "16"    "8"     "2"    );
12memc_nsets=(    "4"     "256"   "64"    "32"   );
13memc_words=(    "16"    "16"    "16"    "16"   );
14memc_heap_size=("4096"  "4096"  "4096"  "4096" );
15
16nb_proc=( "1" "15" "+1" "4");
17wnwords=( "1" "16" "*2" "8");
18wnlines=( "1" "8"  "*2" "8");
19wtimeout=("1" "1024" "*4" "16");
20
21archi_default="1";
22
23function gen_file ()
24{
25        filename=$(printf "x%.2d-xcache_%s-wbuf_%.2d_%.2d_%.4d.cfg" ${1} ${archi_name[${2}]} ${3} ${4} ${5});
26
27        echo ${filename};
28
29        echo "${1}" > ${filename};
30        echo "${iways[${2}]} ${isets[${2}]} ${iwords[${2}]}" >> ${filename};
31        echo "${dways[${2}]} ${dsets[${2}]} ${dwords[${2}]}" >> ${filename};
32        echo "${3} ${4} ${5}" >> ${filename};
33        echo "${memc_nways[${2}]} ${memc_nsets[${2}]} ${memc_words[${2}]} ${memc_heap_size[${2}]}" >> ${filename};
34}
35
36function gen_default ()
37{
38        filename="default.cfg";
39        archi=${1};
40
41        echo ${filename};
42
43        echo "${nb_proc[3]}" > ${filename};
44        echo "${iways[${archi}]} ${isets[${archi}]} ${iwords[${archi}]}" >> ${filename};
45        echo "${dways[${archi}]} ${dsets[${archi}]} ${dwords[${archi}]}" >> ${filename};
46        echo "${wnwords[3]} ${wnlines[3]} ${wtimeout[3]}" >> ${filename};
47        echo "${memc_nways[${archi}]} ${memc_nsets[${archi}]} ${memc_words[${archi}]} ${memc_heap_size[${archi}]}" >> ${filename};
48}
49
50gen_default ${archi_default};
51
52nb_archi=${#iways[*]};
53
54num_archi=0;
55while test ${num_archi} -lt ${nb_archi}; do
56    num_proc=${nb_proc[0]};
57    while test ${num_proc} -le ${nb_proc[1]}; do
58        num_words=${wnwords[0]};
59        while test ${num_words} -le ${wnwords[1]}; do
60            num_lines=${wnlines[0]};
61            while test ${num_lines} -le ${wnlines[1]}; do
62                num_timeout=${wtimeout[0]};
63                while test ${num_timeout} -le ${wtimeout[1]}; do
64
65                    gen_file ${num_proc} ${num_archi} ${num_words} ${num_lines} ${num_timeout};
66
67                    num_timeout=$((${num_timeout} ${wtimeout[2]}));
68                done;
69                num_lines=$((${num_lines} ${wnlines[2]}));
70            done;
71            num_words=$((${num_words} ${wnwords[2]}));
72        done;
73        num_proc=$((${num_proc} ${nb_proc[2]}));
74    done;
75    num_archi=$((${num_archi}+1));
76done;
77
78
Note: See TracBrowser for help on using the repository browser.