From 6dd17931e4fd84b72d06de337fb05687a2b4a26e Mon Sep 17 00:00:00 2001 From: Woojin Lee Date: Mon, 2 Sep 2024 12:50:29 +0900 Subject: [PATCH] Modify `check_verilator_version` (#1) * modify check_verilator_version * Update utils.py --------- Co-authored-by: Minseong Jang --- scripts/cpu/utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/cpu/utils.py b/scripts/cpu/utils.py index 39f9f2c..82b252c 100644 --- a/scripts/cpu/utils.py +++ b/scripts/cpu/utils.py @@ -41,12 +41,10 @@ def check_verilator_version(): if result.returncode == 0: # Extract the version number from the output version_output = result.stdout.splitlines()[0] # Extracting the first line - version_string = version_output.split()[ - -1 - ] # Assuming version number is the last item + version_string = version_output.split()[1] # Assuming version number is the second item # Extracting major version number - major_version = int(version_string.split(".")[0][1]) + major_version = int(version_string.split(".")[0]) minor_version = int(version_string.split(".")[1][:3]) return major_version + (minor_version / 1000)