Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User defined time resolution #607

Open
avelure opened this issue Jan 31, 2023 · 4 comments
Open

User defined time resolution #607

avelure opened this issue Jan 31, 2023 · 4 comments
Labels

Comments

@avelure
Copy link

avelure commented Jan 31, 2023

I have some vague notion that it was once possible to set a user defined time resolution from the command line.
Was the option removed or was it never present?

@nickg
Copy link
Owner

nickg commented Jan 31, 2023

I'm pretty sure the resolution limit has always been fs, the smallest VHDL time unit. Is this a feature you often use in other simulators? I always thought it was more of a Verilog thing.

@nickg nickg added the wishlist label Jan 31, 2023
@avelure
Copy link
Author

avelure commented Jan 31, 2023

No, not really, I think it has just been common to use 1ps on modelsim, possibly there once was some performance gain running at more corse resolution.
I know the free questa that comes with Intel is limited to minimum 1 ps and I came across a testbench today that was designed around expecting the resolution to be 1ps and which failed at 1fs. Though we should probably update the testbench to fetch the resolution from the simulator instead of expecting it to be 1ps.
I see GHDL only supports changing resolution on the mcode backend.

@JimLewis
Copy link

Your maximum run length determined by 1 fs * (2**63-1). This seems to work out to be 9223 seconds, 153.6 minutes, 2.56 hours.

Did I do my calculations right as this would indicate that we need to be able to set the simulator resolution - even just another 1000 would give us more run time than we could use (106 days).

@imphil
Copy link

imphil commented Jan 2, 2024

Just a drive-by comment while I'm at it: When you implement this feature, please consider using a format that matches Verilog's timescale format (1ns, 10ns, 1ps, etc.). That's what most other simulators use as well, and would make our life a bit easier on the cocotb side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants