@@ -34,9 +34,10 @@ configYsyxSoftwareFile() {
3434# download the am repo from the github
3535# ##### abstract-machine ######
3636configAbstractMachine () {
37+ configYsyxSoftwareFile
38+
3739 mkdir -p ${AM_FOLDER_PATH}
3840 cd ${AM_FOLDER_PATH}
39-
4041 if [[ -d ${ABSTRACT_MACHINE_FOLDER_PATH} ]]; then
4142 echo -e " ${RIGHT} abstract-machine exist!${END} "
4243 # if git fsck --full != 0; then
@@ -45,12 +46,14 @@ configAbstractMachine() {
4546 # git clone https://github.com/NJU-ProjectN/abstract-machine.git
4647 # fi
4748 else
48- echo -e " ${INFO} [no download]: git clone...${END} "
49- git clone https://github.com/NJU-ProjectN/abstract-machine.git
49+ echo -e " ${INFO} [no exist] copy...${END} "
50+ cp -rf ${YSYX_SOFTWARE_FILE_PATH} /abstract-machine ./
51+ # echo -e "${INFO}[no download]: git clone...${END}"
52+ # git clone https://github.com/NJU-ProjectN/abstract-machine.git
5053 fi
5154
5255 cd ${ABSTRACT_MACHINE_FOLDER_PATH}
53- git checkout ysyx2021
56+ # git checkout ysyx2021
5457
5558 if [[ -z $AM_HOME ]]; then
5659 echo -e " ${INFO} AM_HOME is empty, set AM_HOME...${END} "
@@ -72,12 +75,11 @@ configAbstractMachine() {
7275configTestSuites () {
7376 mkdir -p ${AM_FOLDER_PATH}
7477 cd ${AM_FOLDER_PATH}
75-
7678 if [[ -d ${RISCV_TESTS_FOLDER_PATH} ]]; then
7779 echo -e " ${RIGHT} riscv-tests exist!${END} "
7880 else
7981 echo -e " ${INFO} [no download]: git clone...${END} "
80- git clone https://github.com/NJU-ProjectN/riscv-tests.git
82+ git clone https://github.com/NJU-ProjectN/riscv-tests.git
8183 fi
8284
8385 cd ${ROOT_PATH}
@@ -137,6 +139,8 @@ configDiffTest() {
137139
138140# ##### NEMU ######
139141configNemu () {
142+ cd ${ROOT_PATH}
143+
140144 if [[ -d ${NEMU_FOLDER_PATH} ]]; then
141145 echo -e " ${RIGHT} NEMU exist!${END} "
142146 else
@@ -167,7 +171,9 @@ configNemu() {
167171 # change the sim memory from 8G to 256MB
168172 # need to enter 'make menuconfig' and
169173 # modify [Memory Configuration]->[Memory size] to '0x10000000' manually
170- # sed -i 's/^\(CONFIG_MSIZE=0x\)\(.*\)/\110000000/' .config
174+ sed -i ' s/^\(CONFIG_MSIZE=0x\)\(.*\)/\110000000/' .config
175+ # NOTE: you need to set the 'NEMU_HOME' and 'NOOP_HOME' in sh config file!
176+ # because the compliation only reads sh env vars
171177
172178 cd ${ROOT_PATH}
173179}
@@ -186,6 +192,7 @@ configDramSim3() {
186192
187193 cd ${DRAMSIM3_FOLDER_PATH}
188194 git checkout 5723f6b1cc157ac2d7b4154b50fd1799c9cf54aa
195+
189196 cd ${ROOT_PATH}
190197}
191198
@@ -199,6 +206,8 @@ configYsyxSoC() {
199206 echo -e " ${INFO} [no download]: git clone...${END} "
200207 git clone --depth 1 https://github.com/OSCPU/ysyxSoC.git
201208 fi
209+
210+ cd ${ROOT_PATH}
202211}
203212
204213helpInfo () {
0 commit comments