Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

VCD file may contain time stamps as floats #306

@oscargus

Description

@oscargus

Not sure how this happens, but we got a bug report for Surfer Waveform Viewer, https://gitlab.com/surfer-project/surfer/-/issues/402 that it couldn't read a VCD from Migen. The cause seems to be that the time stamps in the VCD are written as floats (which is not supported in the standard). Although they are indeed integers as such, ending with .0.

After quickly browsing the code, it seems like Migen wants to keep timing as integers, but that nothing really prohibits using floats.

Hence, my suggestion is to either check that relevant numbers are integers or make sure that the time stamps are printed as integers. My initial worry was that half_period would be an issue, but that is computed with // 2, so will still be rounded to an integer (if an integer is provided).

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