Skip to content

Bug: spurious integer overflow #1161

Open
@motchy869

Description

@motchy869

Description

When types argument is specified to Int16 (e.g. CSV.File(file_path, types=[String, Int16])) and there is near -65536 (but strictly greater than this) values, it seems that overflow occurs and sign is inverted.

I attached a working example.
working_example.zip

In parallel_nco_LC_quality_verif.ipynb, there are two lines:

  1. Utils.visualizeDutOutWav(g_dut_out_wav_buggy, 0.12, 0.14)
  2. Utils.visualizeDutOutWav(g_dut_out_wav_fine, 0.12, 0.14)

In the 1st one, we can see that the data in the time from 310 ns to 330 ns are collapsed.

Current workaround

Specify data type as Int32 in CSV.File() function, then convert to Int16 later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions