From 2001a6633c922a475b4502bdcd2a9e9848ddb258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Thu, 7 Mar 2024 00:06:58 +0100 Subject: [PATCH] fp_dataset: Fix hex representation of most negative value in floatingPoint_tohex() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A value of "0x0x..." does not make sense. Fix that. Signed-off-by: Christoph Müllner --- CHANGELOG.md | 3 +++ riscv_isac/fp_dataset.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 586a516..094aae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.18.1] - 2024-03-07 +- Fix hex representation of most negative value in floatingPoint_tohex() + ## [0.18.0] - 2023-07-26 - Add support to decode compressed instructions diff --git a/riscv_isac/fp_dataset.py b/riscv_isac/fp_dataset.py index fd3bb9a..d93d0a7 100644 --- a/riscv_isac/fp_dataset.py +++ b/riscv_isac/fp_dataset.py @@ -213,7 +213,7 @@ def floatingPoint_tohex(flen,float_no): # Decimal -> if(sign==0): return "0x7FEFFFFFFFFFFFFF" # Most Positive Value else: - return "0x0xFFEFFFFFFFFFFFFF" # Most Negative Value + return "0xFFEFFFFFFFFFFFFF" # Most Negative Value else: # Converting Exponent to 8-Bit Binary exp=int(nor.split("p")[1])+1023 exp_bin=('0'*(11-(len(bin(exp))-2)))+bin(exp)[2:]