Fundamental concept of time required
See original GitHub issueCocotb should have a fundamental concept of time. Currently the Timer()
trigger is expressed in simulation time units, however the user has no knowledge of that this is.
We should query the simulator (in VPI we call vpi_get_time
with vpiTimeUnit
and vpiTimePrecision
properties and a NULL
handle).
Cocotb can then store the fundamental unit and precision and scale appropriately. In my test I can then specify for example a 6.4ns period clock without needing to know the time precision of the simulator.
Issue Analytics
- State:
- Created 10 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Time - Wikipedia
Time in physics is operationally defined as "what a clock reads". The physical nature of time is addressed by general relativity with respect...
Read more >The Illusion of Time: What's Real? - Space.com
At the deepest foundations of nature, time is not a primitive, irreducible element or concept required to construct reality. The idea that time ......
Read more >Time | Internet Encyclopedia of Philosophy
The fundamental theories of physical science—namely relativity theory, quantum theory and the big bang theory—imply that time exists. They imply it ...
Read more >About time - Mathematical Association of America
The time that is measured by a clock is itself produced by that clock. The clock's time is independent of the flow of...
Read more >Time is Fundamental? - Physics Forums
At a deeper level, in which space disappears but time persists, a universal meaning can be given to the concept of now. If...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have an implementation that adds convenience functions into cocotb to allow you to easily specify delays in time units.
I’ve currently got something like this:
I’m not in love with the syntax of the function calls to generate the simulation time counts. But I’m not sure how else we’d get these numbers. The SystemVerilog time unit syntax would be ideal. e.g
But I’m not sure how’d you achieve something similar in python.
Added sim time with units as a concept to
Timer
,Clock
, andget_sim_time
in #474.with_timeout
and test timeouts were added in #1119.