Intel® Simics® Simulator for Intel® FPGAs: User Guide

ID 784383
Date 4/01/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

8.1.5. Integer Conversion

In some cases, it is useful to interpret an integer as a signed value of a specific bit size. For example, when reading four bytes from memory that must be interpreted as a signed 32-bit integer. The signed, signed8, ..., signed64 commands can be used to perform the conversion.

Other useful and related commands are atoi, bits, int-to-*-float, bin, dec, hex, and oct.

The following capture shows an example on how to convert a unsigned value into a signed value using the signed32 command:

#Intel Simics simulator CLI 
simics> set 0xffe0000  0xffffffff

simics> get 0xffe0000

4294967295 (LE)
simics> signed32(get 0xffe0000)

-1