Last change
on this file since 78 was
78,
checked in by rosiere, 16 years ago
|
Add :
- Execute_loop (must be test systemC)
- Prediction
- Direction : predifined scheme
- Branch Target Buffer
- iFetch_unit
- ifetch_queue
- pc management
- Decod_unit
- coming soon : support for custom operation
- Rename_unit
- RAT
- Free_list
- Dependence RAW check
- Load store unit pointer
- New Environnement (hierarchy_memory will remove in a next version)
Modif :
- Manage Custom Operation
- All component in execute_loop to use the new statistics management
Not Finish :
- Return Address Stack
- Environnement
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | #-----[ usage ]--------------------------------------------- |
---|
| 4 | function usage () |
---|
| 5 | { |
---|
[78] | 6 | echo "Usage : ${0} min max [step [iter]]"; |
---|
| 7 | echo "Arguments : "; |
---|
[2] | 8 | echo " * min : value minimal"; |
---|
| 9 | echo " * max : value maximal"; |
---|
| 10 | echo " * step : step between two value. If no present, step = \"+1\""; |
---|
| 11 | echo " * iter : choose the Nième value"; |
---|
| 12 | exit; |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | #-----[ range ]--------------------------------------------- |
---|
| 16 | function range () |
---|
| 17 | { |
---|
[78] | 18 | declare a=${1}; |
---|
| 19 | declare b=${2}; |
---|
| 20 | declare step=${3}; |
---|
[2] | 21 | |
---|
[78] | 22 | while test ${a} -lt ${b}; do |
---|
| 23 | echo ${a}; |
---|
| 24 | a=$((${a} ${step})); |
---|
[57] | 25 | done |
---|
| 26 | |
---|
[78] | 27 | if test ${a} -eq ${b}; then |
---|
| 28 | echo ${a}; |
---|
[57] | 29 | fi; |
---|
[2] | 30 | } |
---|
| 31 | |
---|
| 32 | #-----[ range_max ]----------------------------------------- |
---|
| 33 | function range_max () |
---|
| 34 | { |
---|
[78] | 35 | declare a=${1}; |
---|
| 36 | declare b=${2}; |
---|
| 37 | declare step=${3}; |
---|
| 38 | declare iter=${4}; |
---|
[2] | 39 | |
---|
[78] | 40 | while test ${a} -lt ${b} -a ${iter} -gt 1; do |
---|
| 41 | a=$((${a} ${step})); |
---|
| 42 | iter=$((${iter}-1)); |
---|
[2] | 43 | done; |
---|
| 44 | |
---|
[78] | 45 | if test ${a} -eq ${b}; then |
---|
| 46 | echo ${a}; |
---|
[57] | 47 | fi; |
---|
| 48 | |
---|
[78] | 49 | if test ${iter} -eq 1; then |
---|
| 50 | echo ${a}; |
---|
[2] | 51 | fi; |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | #-----[ main ]---------------------------------------------- |
---|
| 55 | function main () |
---|
| 56 | { |
---|
| 57 | # create operande |
---|
[78] | 58 | case ${#} in |
---|
| 59 | 2) range ${*} "+1";; |
---|
| 60 | 3) range ${*} ;; |
---|
| 61 | 4) range_max ${*} ;; |
---|
| 62 | *) usage ${*} |
---|
[2] | 63 | esac |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | #-----[ Corps ]--------------------------------------------- |
---|
[78] | 67 | main ${*} |
---|
Note: See
TracBrowser
for help on using the repository browser.