aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xriscv/gen_icache5
1 files changed, 3 insertions, 2 deletions
diff --git a/riscv/gen_icache b/riscv/gen_icache
index 7ec3c69..67c0d69 100755
--- a/riscv/gen_icache
+++ b/riscv/gen_icache
@@ -1,7 +1,8 @@
#!/bin/sh
-n=$(($1-1))
-for i in `seq 0 $n`
+i=0
+while [ $i -lt $1 ]
do
echo case $i: ICACHE_ACCESS\($i\)\;
+ i=$((i+1))
done
echo