Skip to content

hdl: Auto-update testbench after initialisation

Dimitris Lampridis requested to merge feature/hdl_testbench_autoupdate into develop

The expected use of the MockTurtleDriver before was that the user would first call init() once and then manually call update() in a loop in order to handle interrupts etc.

Following discussions today with @kblantos, I realised that the whole idea of manually running update() is cumbersome and not very intuitive (especially since the testbench classes are not documented, my mistake).

With this modification, the update() loop is forked (without join) at the end of init(), making it "automatic" and more intuitive from the point of view of the user of the MockTurtleDriver class.

In the process of modifying it, I've also added an optional parameter to init() to control how ofter update() is called. The default is still 1us, like it was done in all MT (and WRTD) testbenches.

Merge request reports