Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fp_dataset: Fix hex representation of most negative value in floating…
Browse files Browse the repository at this point in the history
…Point_tohex()

A value of "0x0x..." does not make sense.
Fix that.

Signed-off-by: Christoph Müllner <[email protected]>
  • Loading branch information
cmuellner committed Mar 6, 2024
1 parent db75040 commit 2001a66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion riscv_isac/fp_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down

0 comments on commit 2001a66

Please sign in to comment.