svunit / svmock

A mock framework for use with SVUnit
Apache License 2.0
15 stars 4 forks source link

Add time/event control for tasks #3

Open tudortimi-ifx opened 6 years ago

tudortimi-ifx commented 6 years ago

SV tasks have the particularity that they consume simulation time. It should be possible to control the moment they unblock similar to how return values of functions can be controlled.

tudortimi-ifx commented 6 years ago

In some handwritten mocks, I did this by having the mocked out task block on an event that could be triggered from outside:

` do_stuff_that_calls_spawns_task_of_mock(); do_other_stuff_that_consumes_time(); -> mock.unblock_time_consuming_task; do_more_stuff_that_consumes_time();

// perform checks // ... `