Last change
on this file since 141 was
137,
checked in by rosiere, 15 years ago
|
Various modif (add test, and vhdl)
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
1.6 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | function genFile_name() |
---|
4 | { |
---|
5 | bank=$1; |
---|
6 | read=$2; |
---|
7 | write=$3; |
---|
8 | file_out="-regfile_${bank}x_${read}r_${write}w"; |
---|
9 | |
---|
10 | echo "${file_out}"; |
---|
11 | } |
---|
12 | |
---|
13 | function genFile_cfg() |
---|
14 | { |
---|
15 | file_in=$1; |
---|
16 | file_out=$2; |
---|
17 | ext=$3; |
---|
18 | bank=$4; |
---|
19 | read=$5; |
---|
20 | write=$6; |
---|
21 | |
---|
22 | sed s/@name/${file_out}/ ${file_in}.${ext} | |
---|
23 | sed s/@bank/${bank}/ | |
---|
24 | sed s/@read/${read}/ | |
---|
25 | sed s/@write/${write}/ > ${file_out}.${ext}; |
---|
26 | } |
---|
27 | |
---|
28 | function genFile_sim() |
---|
29 | { |
---|
30 | file_in=$1; |
---|
31 | file_out=$2; |
---|
32 | ext=$3; |
---|
33 | file=$4; |
---|
34 | sed s/@file/${file}/ ${file_in}.${ext} > ${file_out}.${ext}; |
---|
35 | } |
---|
36 | |
---|
37 | function genTest() |
---|
38 | { |
---|
39 | file_cfg="Instance_x01_w04_02" |
---|
40 | file_sim="Dhrystone-x01_w04_02" |
---|
41 | ext="cfg" |
---|
42 | banks=( 1 |
---|
43 | 2 2 2 |
---|
44 | 4 4 4 |
---|
45 | 8 8 8 |
---|
46 | 16 16 |
---|
47 | 32); |
---|
48 | reads=( 12 # bank : 1 |
---|
49 | 10 8 6 # bank : 2 |
---|
50 | 8 6 4 # bank : 3 |
---|
51 | 4 2 1 # bank : 6 |
---|
52 | 2 1 # bank : 12 |
---|
53 | 1); # bank : 48 |
---|
54 | writes=(6 # bank : 1 |
---|
55 | 5 4 3 # bank : 2 |
---|
56 | 4 3 2 # bank : 3 |
---|
57 | 2 1 1 # bank : 6 |
---|
58 | 1 1 # bank : 12 |
---|
59 | 1); # bank : 48 |
---|
60 | nb_cfg=${#banks[*]}; |
---|
61 | |
---|
62 | while test $nb_cfg -ge 1; do |
---|
63 | nb_cfg=$(($nb_cfg-1)); |
---|
64 | |
---|
65 | bank=${banks[$nb_cfg]}; |
---|
66 | read=${reads[$nb_cfg]}; |
---|
67 | write=${writes[$nb_cfg]}; |
---|
68 | |
---|
69 | postfix=$(genFile_name $bank $read $write); |
---|
70 | echo ${file_cfg}${postfix}; |
---|
71 | genFile_cfg $file_cfg ${file_cfg}${postfix} $ext $bank $read $write; |
---|
72 | genFile_sim $file_sim ${file_sim}${postfix} $ext ${file_cfg}${postfix}.${ext}; |
---|
73 | done; |
---|
74 | } |
---|
75 | |
---|
76 | genTest ${*}; |
---|
Note: See
TracBrowser
for help on using the repository browser.