Creating Asynchronous Clocks
Why OSVVM™? › Forums › OSVVM › Creating Asynchronous Clocks
- This topic has 5 replies, 4 voices, and was last updated 3 months, 3 weeks ago by Brad Adam.
-
AuthorPosts
-
April 3, 2023 at 23:50 #2178Brad AdamMember
I’m looking to create a simulation that uses two asynchronous clocks, is there a way within OSVVM to add a delay before starting a clock so that it does not begin generating at time 0 in a simulation?
I’m not seeing any options for this within the CreateClock procedure, is there possibly another function that allows this behavior?
Thanks.
April 4, 2023 at 00:42 #2179Jim LewisMemberHi Adam,
Not yet. Are you interested in doing a pull request against TbUtilPkg?Best Regards,
JimAugust 4, 2023 at 09:51 #2267AnnaMemberHi,
I am also very interested in this feature. That is a status of the change?
Thanks.March 17, 2024 at 01:28 #2358fpgaphreakMemberMe too. What is about Jitter Simulation with min/max definitions of the phase to simulate short term jitter effects?
July 19, 2024 at 03:32 #2533Jim LewisMember2024.07 updates CreateClock. They are breaking changes – meaning the way clock starts up is different. There was alot of unneeded complexity that was part of the old CreateClock that has been minimized – while still keeping clock changing at simulation cycle 0 (aka delta cycle 0).
If you want to preview it, see the Dev branch. Nominally it looks like this:
procedure CreateClock ( signal Clk : inout std_logic ; constant Period : in time ; constant DutyCycle : in real := 0.5 ; constant Offset : in time := 0 sec ; constant ClkActive : in std_logic := CLK_ACTIVE ) ;
Without an offset, Clk starts with CLK_ACTIVE at time 0.
The old CreateClock the starting value depended on the initialization of clock and whether the Clock active time matched the clock inactive time. That is not so good as a small change in setup (like initialize the clk vs not initializing it) resulted in differences in behavior.
The old behavior will be available either as OldCreateClock or if you set options in OsvvmSettingsLocal. I will get more into this in the release notes later.
There is also a version that has an enable signal (boolean).
There is also a version that creates a jitter clock. CreateJitterClock.
August 27, 2024 at 18:50 #2563Brad AdamMemberHey,
This is awesome news, I really appreciate the continued updates to these libraries.
Regarding clock jitter, looking into the code in ClockRstPkg.vhd I’m not sure I fully understand what is happening with the supplied coverage ID. Has there been a documentation update which details this new function?
I would expect a jitter clock to oscillate randomly in the picosecond range at each transition, is this essentially what CreateJitterClock will do?
Also, while I have your ear, I am looking to dedicate some cycles in the coming weeks to compile some info on Cosiming with Riviera, MATLAB, and OSVVM, what would be the best way to send you that documentation so you can decide if its worth adding to a blog post?
Thanks,
Brad -
AuthorPosts
- You must be logged in to reply to this topic.