From 510b9949d2289ea2a05f7d1c082d3742e3eaaf14 Mon Sep 17 00:00:00 2001 From: Yan Yue <1131531947@qq.com> Date: Sat, 4 Jan 2025 15:39:43 +0800 Subject: [PATCH] util: delete gem5_home envirment Change-Id: I77845bf7ca36ce1530466e86df43ca0ab0fea5f0 --- .gitignore | 4 +++- configs/common/XSConfig.py | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ad4c1930aa..acc805e602 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,6 @@ configs/dram/lowp_sweep.cfg util/xs_scripts/test/ run_fs.sh .vscode/ -llvm-pgo/ \ No newline at end of file +llvm-pgo/ +*.profdata +*.profraw \ No newline at end of file diff --git a/configs/common/XSConfig.py b/configs/common/XSConfig.py index d9aacf0de0..0d4a828ce9 100644 --- a/configs/common/XSConfig.py +++ b/configs/common/XSConfig.py @@ -107,12 +107,9 @@ def config_xiangshan_inputs(args: argparse.Namespace, sys): # configure DRAMSim input if args.mem_type == 'DRAMsim3' and args.dramsim3_ini is None: - home = None - if 'gem5_home' in os.environ: - home = os.environ['gem5_home'] - if 'GEM5_HOME' in os.environ: - home = os.environ['GEM5_HOME'] - args.dramsim3_ini = os.path.join(home, 'ext/dramsim3/xiangshan_configs/xiangshan_DDR4_8Gb_x8_3200_2ch.ini') + # use relative path to find the dramsim3 ini file, from configs/common/ to root + root_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) + args.dramsim3_ini = os.path.join(root_dir, 'ext/dramsim3/xiangshan_configs/xiangshan_DDR4_8Gb_x8_3200_2ch.ini') return gcpt_restorer, ref_so