Update License comments (#134)

This commit is contained in:
Yinan Xu 2023-09-06 16:40:04 +08:00 committed by GitHub
parent f74f9189e6
commit e57910562f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 174 additions and 177 deletions

View File

@ -53,8 +53,8 @@
3 请将如下声明文本放入每个源文件的头部注释中。 3 请将如下声明文本放入每个源文件的头部注释中。
Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
XiangShan is licensed under Mulan PSL v2. DiffTest is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at: You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2 http://license.coscl.org.cn/MulanPSL2
@ -118,8 +118,8 @@
iii Attach the statement to the appropriate annotated syntax at the beginning of each source file. iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
XiangShan is licensed under Mulan PSL v2. DiffTest is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at: You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2 http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
#*************************************************************************************** #***************************************************************************************
# Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences # Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
# Copyright (c) 2020-2021 Peng Cheng Laboratory # Copyright (c) 2020-2021 Peng Cheng Laboratory
# #
# XiangShan is licensed under Mulan PSL v2. # DiffTest is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at: # You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2 # http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
#*************************************************************************************** #***************************************************************************************
# Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences # Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
# Copyright (c) 2020-2021 Peng Cheng Laboratory # Copyright (c) 2020-2021 Peng Cheng Laboratory
# #
# XiangShan is licensed under Mulan PSL v2. # DiffTest is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at: # You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2 # http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -40,7 +40,7 @@ extern "C" void xs_assert(long long line) {
} }
void sig_handler(int signo) { void sig_handler(int signo) {
if (signal_num != 0) if (signal_num != 0)
exit(0); exit(0);
signal_num = signo; signal_num = signo;
} }

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -84,7 +84,7 @@ long readFromGz(void* ptr, const char *file_name, long buf_size, uint8_t load_ty
printf("buf_size must be divisible by chunk_size\n"); printf("buf_size must be divisible by chunk_size\n");
assert(0); assert(0);
} }
long *temp_page = new long[chunk_size]; long *temp_page = new long[chunk_size];
long *pmem_current = (long*)ptr; long *pmem_current = (long*)ptr;

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -38,22 +38,22 @@ enum {
#define SDL_KEYMAP(k) [concat(SDL_SCANCODE_, k)] = concat(_KEY_, k), #define SDL_KEYMAP(k) [concat(SDL_SCANCODE_, k)] = concat(_KEY_, k),
static const uint32_t keymap[256] = { static const uint32_t keymap[256] = {
// MAP(_KEYS, SDL_KEYMAP) // MAP(_KEYS, SDL_KEYMAP)
0, 0, 0, 0, 43, 60, 58, 45, 31, 46, 47, 48, 36, 49, 50, 51, 0, 0, 0, 0, 43, 60, 58, 45, 31, 46, 47, 48, 36, 49, 50, 51,
62, 61, 37, 38, 29, 32, 44, 33, 35, 59, 30, 57, 34, 56, 15, 16, 62, 61, 37, 38, 29, 32, 44, 33, 35, 59, 30, 57, 34, 56, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 54, 1, 27, 28, 70, 25, 26, 39, 17, 18, 19, 20, 21, 22, 23, 24, 54, 1, 27, 28, 70, 25, 26, 39,
40, 41, 0, 52, 53, 14, 63, 64, 65, 42, 2, 3, 4, 5, 6, 7, 40, 41, 0, 52, 53, 14, 63, 64, 65, 42, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 0, 0, 0, 77, 79, 81, 78, 80, 82, 76, 8, 9, 10, 11, 12, 13, 0, 0, 0, 77, 79, 81, 78, 80, 82, 76,
75, 74, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
67, 55, 69, 0, 72, 66, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 55, 69, 0, 72, 66, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; };
#define KEY_QUEUE_LEN 1024 #define KEY_QUEUE_LEN 1024

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -97,7 +97,7 @@ public:
difftest_core_state_t *ref_ptr; difftest_core_state_t *ref_ptr;
// Note: dut & ref does not contain valid value in runahead // Note: dut & ref does not contain valid value in runahead
// use dut_ptr & ref_ptr instead. // use dut_ptr & ref_ptr instead.
// To be refactored later. // To be refactored later.
#ifdef QUERY_MEM_ACCESS #ifdef QUERY_MEM_ACCESS
void do_query_mem_access(RunaheadResponseQuery* result_buffer); void do_query_mem_access(RunaheadResponseQuery* result_buffer);

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -17,4 +17,3 @@
extern char* dasm_result; extern char* dasm_result;
int test_spike(); int test_spike();
void spike_dasm(char* result, char* input); void spike_dasm(char* result, char* input);

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -69,7 +69,7 @@ bool MemdepWatchWindow::query_load_store_dep(uint64_t load_pc, uint64_t load_vad
load_vaddr load_vaddr
); );
if( if(
((i.vaddr | 0x7) == (load_vaddr | 0x7)) && ((i.vaddr | 0x7) == (load_vaddr | 0x7)) &&
!((load_vaddr & 0xf0000000 ) == 0x40000000) // hard code mmio !((load_vaddr & 0xf0000000 ) == 0x40000000) // hard code mmio
){ ){
has_dependency = true; has_dependency = true;

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -27,7 +27,7 @@ int runahead_resp_msgq_id = 0;
bool runahead_is_slave = false; bool runahead_is_slave = false;
Runahead::Runahead(int coreid): Difftest(coreid) { Runahead::Runahead(int coreid): Difftest(coreid) {
} }
void Runahead::remove_all_checkpoints(){ void Runahead::remove_all_checkpoints(){
@ -57,8 +57,8 @@ int runahead_init() {
runahead[i] = new Runahead(i); runahead[i] = new Runahead(i);
// runahead uses difftest_core_state_t dut in Difftest // runahead uses difftest_core_state_t dut in Difftest
// to be refactored later // to be refactored later
runahead[i]->dut_ptr = difftest[i]->get_dut(); runahead[i]->dut_ptr = difftest[i]->get_dut();
runahead[i]->ref_ptr = runahead[i]->get_ref(); runahead[i]->ref_ptr = runahead[i]->get_ref();
runahead[i]->update_nemuproxy(i, 0); runahead[i]->update_nemuproxy(i, 0);
} }
runahead_debug("Allocate msgq for %s\n", emu_path); runahead_debug("Allocate msgq for %s\n", emu_path);
@ -109,7 +109,7 @@ bool Runahead::checkpoint_num_exceed_limit() {
} }
// Just normally run a inst // Just normally run a inst
// //
// No checkpoint will be allocated. // No checkpoint will be allocated.
// If it is the first valid inst to be runahead, some init work will be done // If it is the first valid inst to be runahead, some init work will be done
// in do_first_instr_runahead(). // in do_first_instr_runahead().
@ -121,7 +121,7 @@ int Runahead::do_instr_runahead(){
return 0; return 0;
} }
// If current inst is a jump, set up a checkpoint for recovering, // If current inst is a jump, set up a checkpoint for recovering,
// then set jump target to jump_target_pc // then set jump target to jump_target_pc
// //
// Return checkpoint pid // Return checkpoint pid
@ -166,7 +166,7 @@ void Runahead::register_checkpoint(pid_t pid, uint64_t branch_checkpoint_id, uin
} }
// Free the oldest checkpoint // Free the oldest checkpoint
// //
// Should be called when a branch is solved or that inst is committed. // Should be called when a branch is solved or that inst is committed.
// Note that all checkpoints should be freed after that inst commits. // Note that all checkpoints should be freed after that inst commits.
pid_t Runahead::free_checkpoint() { pid_t Runahead::free_checkpoint() {
@ -198,7 +198,7 @@ void Runahead::recover_checkpoint(uint64_t checkpoint_id) {
branch_pc = checkpoints.back().pc; branch_pc = checkpoints.back().pc;
if(!checkpoints.back().may_replay){ if(!checkpoints.back().may_replay){
// if checkpoint was set up by branch, it will jump to the right target // if checkpoint was set up by branch, it will jump to the right target
branch_reported = true; branch_reported = true;
runahead_debug("Checkpoint generated by branch\n"); runahead_debug("Checkpoint generated by branch\n");
} else { } else {
// if checkpoint was set up by load, it will replay itself // if checkpoint was set up by load, it will replay itself
@ -232,7 +232,7 @@ void Runahead::do_first_instr_runahead() {
proxy->memcpy(PMEM_BASE, get_img_start(), get_img_size(), DIFFTEST_TO_REF); proxy->memcpy(PMEM_BASE, get_img_start(), get_img_size(), DIFFTEST_TO_REF);
// Manually setup simulator init regs, // Manually setup simulator init regs,
// for at this time, the first has not been initialied // for at this time, the first has not been initialied
dut_ptr->csr.this_pc = FIRST_INST_ADDRESS; dut_ptr->csr.this_pc = FIRST_INST_ADDRESS;
proxy->regcpy(&dut_ptr->regs, DIFFTEST_TO_REF); proxy->regcpy(&dut_ptr->regs, DIFFTEST_TO_REF);
DynamicSimulatorConfig nemu_config; DynamicSimulatorConfig nemu_config;
nemu_config.ignore_illegal_mem_access = true; nemu_config.ignore_illegal_mem_access = true;
@ -254,7 +254,7 @@ int Runahead::memdep_check(int i, RunaheadResponseQuery* ref_mem_query_result) {
// assert(mem_access_info->mem_access_is_load); // assert(mem_access_info->mem_access_is_load);
auto dut_result = dut_ptr->runahead_memdep_pred[i].need_wait; auto dut_result = dut_ptr->runahead_memdep_pred[i].need_wait;
auto ref_result = mem_access_info->ref_need_wait; auto ref_result = mem_access_info->ref_need_wait;
runahead_debug("Runahead memdep_check: ref is load %x dut %x ref %x\n", runahead_debug("Runahead memdep_check: ref is load %x dut %x ref %x\n",
mem_access_info->mem_access_is_load, dut_result, ref_result mem_access_info->mem_access_is_load, dut_result, ref_result
); );
memdep_watcher->update_pred_matrix( memdep_watcher->update_pred_matrix(
@ -302,29 +302,29 @@ int Runahead::step() { // override step() method
// ignore run ahead req generated in current cycle // ignore run ahead req generated in current cycle
dut_ptr->runahead[i].valid = false; dut_ptr->runahead[i].valid = false;
} }
return 0; return 0;
} }
for (int i = 0; i < DIFFTEST_COMMIT_WIDTH && dut_ptr->runahead_commit[i].valid; i++) { for (int i = 0; i < DIFFTEST_COMMIT_WIDTH && dut_ptr->runahead_commit[i].valid; i++) {
dut_ptr->runahead_commit[i].valid = false; dut_ptr->runahead_commit[i].valid = false;
dut_ptr->runahead_memdep_pred[i].valid = false; dut_ptr->runahead_memdep_pred[i].valid = false;
runahead_debug("Run ahead: jump inst %lx commited, free oldest checkpoint\n", runahead_debug("Run ahead: jump inst %lx commited, free oldest checkpoint\n",
dut_ptr->runahead_commit[i].pc dut_ptr->runahead_commit[i].pc
); );
free_checkpoint(); free_checkpoint();
} }
for (int i = 0; i < DIFFTEST_RUNAHEAD_WIDTH && dut_ptr->runahead[i].valid; i++) { for (int i = 0; i < DIFFTEST_RUNAHEAD_WIDTH && dut_ptr->runahead[i].valid; i++) {
runahead_debug("Run ahead: pc %lx branch(reported by DUT) %x cpid %lx\n", runahead_debug("Run ahead: pc %lx branch(reported by DUT) %x cpid %lx\n",
dut_ptr->runahead[i].pc, dut_ptr->runahead[i].pc,
dut_ptr->runahead[i].branch, dut_ptr->runahead[i].branch,
dut_ptr->runahead[i].checkpoint_id dut_ptr->runahead[i].checkpoint_id
); );
// check if branch is reported by previous inst // check if branch is reported by previous inst
if(branch_reported) { if(branch_reported) {
pid_t pid = do_instr_runahead_pc_guided(dut_ptr->runahead[i].pc); pid_t pid = do_instr_runahead_pc_guided(dut_ptr->runahead[i].pc);
// no need to call do_query_mem_access(), as runahead_pc_guided is branch inst // no need to call do_query_mem_access(), as runahead_pc_guided is branch inst
// register new checkpoint // register new checkpoint
register_checkpoint(pid, branch_checkpoint_id, branch_pc, may_replay); register_checkpoint(pid, branch_checkpoint_id, branch_pc, may_replay);
runahead_debug("New checkpoint: pid %d cpid %lx pc %lx\n", runahead_debug("New checkpoint: pid %d cpid %lx pc %lx\n",
pid, pid,
branch_checkpoint_id, branch_checkpoint_id,
branch_pc branch_pc
@ -332,15 +332,15 @@ int Runahead::step() { // override step() method
#ifdef QUERY_MEM_ACCESS #ifdef QUERY_MEM_ACCESS
RunaheadResponseQuery ref_mem_access; RunaheadResponseQuery ref_mem_access;
do_query_mem_access(&ref_mem_access); do_query_mem_access(&ref_mem_access);
// runahead_debug("dut runahead pc %lx ref pc %lx\n", // runahead_debug("dut runahead pc %lx ref pc %lx\n",
runahead_debug("dut runahead pc %lx ref pc %lx ticks %ld\n", runahead_debug("dut runahead pc %lx ref pc %lx ticks %ld\n",
branch_pc, branch_pc,
ref_mem_access.result.mem_access_info.pc, ref_mem_access.result.mem_access_info.pc,
ticks ticks
); );
loop_if_not(branch_pc == ref_mem_access.result.mem_access_info.pc); loop_if_not(branch_pc == ref_mem_access.result.mem_access_info.pc);
if(!(branch_pc == ref_mem_access.result.mem_access_info.pc)){ if(!(branch_pc == ref_mem_access.result.mem_access_info.pc)){
printf("Error: dut runahead pc %lx ref pc %lx ticks %ld\n", printf("Error: dut runahead pc %lx ref pc %lx ticks %ld\n",
branch_pc, branch_pc,
ref_mem_access.result.mem_access_info.pc, ref_mem_access.result.mem_access_info.pc,
ticks ticks
@ -350,7 +350,7 @@ int Runahead::step() { // override step() method
#endif #endif
} }
assert(!(dut_ptr->runahead[i].branch && dut_ptr->runahead[i].may_replay)); assert(!(dut_ptr->runahead[i].branch && dut_ptr->runahead[i].may_replay));
if(dut_ptr->runahead[i].branch || dut_ptr->runahead[i].may_replay) { if(dut_ptr->runahead[i].branch || dut_ptr->runahead[i].may_replay) {
branch_reported = true; branch_reported = true;
may_replay = dut_ptr->runahead[i].may_replay; may_replay = dut_ptr->runahead[i].may_replay;
branch_checkpoint_id = dut_ptr->runahead[i].checkpoint_id; branch_checkpoint_id = dut_ptr->runahead[i].checkpoint_id;
@ -361,15 +361,15 @@ int Runahead::step() { // override step() method
#ifdef QUERY_MEM_ACCESS #ifdef QUERY_MEM_ACCESS
RunaheadResponseQuery ref_mem_access; RunaheadResponseQuery ref_mem_access;
do_query_mem_access(&ref_mem_access); do_query_mem_access(&ref_mem_access);
// runahead_debug("dut runahead pc %lx ref pc %lx\n", // runahead_debug("dut runahead pc %lx ref pc %lx\n",
runahead_debug("dut runahead pc %lx ref pc %lx ticks %ld\n", runahead_debug("dut runahead pc %lx ref pc %lx ticks %ld\n",
dut_ptr->runahead[i].pc, dut_ptr->runahead[i].pc,
ref_mem_access.result.mem_access_info.pc, ref_mem_access.result.mem_access_info.pc,
ticks ticks
); );
loop_if_not(dut_ptr->runahead[i].pc == ref_mem_access.result.mem_access_info.pc); loop_if_not(dut_ptr->runahead[i].pc == ref_mem_access.result.mem_access_info.pc);
if(!(dut_ptr->runahead[i].pc == ref_mem_access.result.mem_access_info.pc)){ if(!(dut_ptr->runahead[i].pc == ref_mem_access.result.mem_access_info.pc)){
printf("Error: dut runahead pc %lx ref pc %lx ticks %ld\n", printf("Error: dut runahead pc %lx ref pc %lx ticks %ld\n",
dut_ptr->runahead[i].pc, dut_ptr->runahead[i].pc,
ref_mem_access.result.mem_access_info.pc, ref_mem_access.result.mem_access_info.pc,
ticks ticks
@ -421,7 +421,7 @@ void Runahead::request_slave_refquery(void* resp_target, int type) {
return; return;
} }
// Print all valid items in checkpoint_list (oldest first) // Print all valid items in checkpoint_list (oldest first)
void Runahead::debug_print_checkpoint_list() { void Runahead::debug_print_checkpoint_list() {
for(auto i:checkpoints){ for(auto i:checkpoints){
runahead_debug("checkpoint: checkpoint_id %lx pc %lx pid %d\n", runahead_debug("checkpoint: checkpoint_id %lx pc %lx pid %d\n",
@ -513,7 +513,7 @@ void Runahead::runahead_slave() {
// Return pid if succeed // Return pid if succeed
pid_t Runahead::init_runahead_slave() { pid_t Runahead::init_runahead_slave() {
// run ahead simulator needs its own addr space // run ahead simulator needs its own addr space
// slave will be initialized after first run ahead request is sent // slave will be initialized after first run ahead request is sent
pid_t pid = fork(); pid_t pid = fork();
if(pid < 0){ if(pid < 0){
runahead_debug("Failed to create the first runahead slave\n"); runahead_debug("Failed to create the first runahead slave\n");
@ -532,14 +532,14 @@ pid_t Runahead::init_runahead_slave() {
// Return pid if succeed // Return pid if succeed
pid_t Runahead::fork_runahead_slave() { pid_t Runahead::fork_runahead_slave() {
// run ahead simulator needs its own addr space // run ahead simulator needs its own addr space
// slave will be initialized after first run ahead request is sent // slave will be initialized after first run ahead request is sent
pid_t pid = fork(); pid_t pid = fork();
if(pid < 0){ if(pid < 0){
runahead_debug("Failed to fork runahead slave\n"); runahead_debug("Failed to fork runahead slave\n");
assert(0); assert(0);
} }
if(pid == 0){ if(pid == 0){
return 0; return 0;
// I am the newest checkpoint // I am the newest checkpoint
} else { } else {
// Wait until checkpoint is recovered or checkpoint is freed // Wait until checkpoint is recovered or checkpoint is freed

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -23,28 +23,28 @@ int test_spike()
return system("echo \"DASM(deadbeef)\" | spike-dasm > /dev/null"); return system("echo \"DASM(deadbeef)\" | spike-dasm > /dev/null");
} }
void execute_cmd(const char *cmd, char *result) void execute_cmd(const char *cmd, char *result)
{ {
char buf_ps[1024]; char buf_ps[1024];
char ps[1024]={0}; char ps[1024]={0};
FILE *ptr; FILE *ptr;
strcpy(ps, cmd); strcpy(ps, cmd);
if((ptr=popen(ps, "r"))!=NULL) if((ptr=popen(ps, "r"))!=NULL)
{ {
while(fgets(buf_ps, 1024, ptr)!=NULL) while(fgets(buf_ps, 1024, ptr)!=NULL)
{ {
strcat(result, buf_ps); strcat(result, buf_ps);
if(strlen(result)>1024) if(strlen(result)>1024)
break; break;
} }
pclose(ptr); pclose(ptr);
ptr = NULL; ptr = NULL;
} }
else else
{ {
printf("popen %s error\n", ps); printf("popen %s error\n", ps);
} }
} }
void spike_dasm(char* result, char* input) void spike_dasm(char* result, char* input)
{ {
@ -69,7 +69,7 @@ int usage()
int spike_invalid = test_spike(); int spike_invalid = test_spike();
if(!spike_invalid) if(!spike_invalid)
spike_dasm(dasm_result, input); spike_dasm(dasm_result, input);
printf("%s", dasm_result); printf("%s", dasm_result);
return 0; return 0;
} }

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -46,4 +46,3 @@ module RAMHelper(
end end
endmodule endmodule

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
/*************************************************************************************** /***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences * Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
* Copyright (c) 2020-2021 Peng Cheng Laboratory * Copyright (c) 2020-2021 Peng Cheng Laboratory
* *
* XiangShan is licensed under Mulan PSL v2. * DiffTest is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: * You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2 * http://license.coscl.org.cn/MulanPSL2
@ -156,4 +156,3 @@ always @(posedge clock) begin
end end
endmodule endmodule

4
vcs.mk
View File

@ -1,8 +1,8 @@
#*************************************************************************************** #***************************************************************************************
# Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences # Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
# Copyright (c) 2020-2021 Peng Cheng Laboratory # Copyright (c) 2020-2021 Peng Cheng Laboratory
# #
# XiangShan is licensed under Mulan PSL v2. # DiffTest is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at: # You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2 # http://license.coscl.org.cn/MulanPSL2

View File

@ -1,8 +1,8 @@
#*************************************************************************************** #***************************************************************************************
# Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences # Copyright (c) 2020-2023 Institute of Computing Technology, Chinese Academy of Sciences
# Copyright (c) 2020-2021 Peng Cheng Laboratory # Copyright (c) 2020-2021 Peng Cheng Laboratory
# #
# XiangShan is licensed under Mulan PSL v2. # DiffTest is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at: # You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2 # http://license.coscl.org.cn/MulanPSL2