5 HANDLING INACCURACY IN
VPS
As described in (Synopsys, 20 13) VPs a re not a re-
placement fo r a c tual HIL testin g but provide aid in
the different stages of the V-cycle SW development
model. With this in mind, one might argue, tha t a
time inaccuracy of a few clock cycle as exemplary
measured in section 3.2 does not make a VP func-
tional incorrect and unusable for SW with real time
requirements. However, for those SW a pplications
timeliness of tasks is an ad ditional functional pro perty
defining correctness. This rises the question, whethe r
inaccuracy due to abstra ction in the modeling makes
VPs still usab le here. In case of just the pure func-
tional aspect of the individual task inside the software
the answer is a definite yes. Realizing event chains
with different hardware and software modules (e.g.
ADC input sampling → DMA data transfer → Core
calculating new PWM width → PWM mod ule output)
will definitely profit from the numerous advantages a
VP offers. The actual challenge here is ge tting the
overall timing of an event chain and the timing be-
tween its different components right. Typically th ere
is a pe riodic deadline, where new o utput values have
to be available for the whole rea l time system to work
on properly.
In the best case, all modeled components inside
a VP have a positive time inaccuracy compared to
the phy sical hardware, giving tasks a gre ater slack on
their deadlines on the latter one. However, if this pos-
itive time inaccuracy is to great, SW developers might
encounter task s not holding their deadlines only in
the VP. This will result in un necessary ch a nges to the
overall software design. In the exact opposite c ase
the designed SW systems performs correct on the VP,
but produces timing issues o n the physical hardware.
These issues cann ot be detected and located insde the
VP and require expensive testing and debugging on
the physical hardware.
All these problem cases could be dealt with at
least to a certain amount o f confidence if the total
inaccuracy inside the VP is known and always pos-
itive (task runtimes on VP not faster than on physical
hardware). This is in most times not possible, since
accuracy of VPs is usually deter mined by running a
(high) number of benchmarks comparing there execu-
tion time b e tween the VP and the corresponding phy s-
ical hardware. An examples is the Embench Bench-
mark Suit
1
that was used by (Herdt et a l., 2020) to
evaluate the accuracy of their VP mod eling the SiFive
HiFive1 architecture. Each benchmark was deployed
1
https://www. embench.org/
on the VP and then compared to the execution time
on the open source RTL model of the corresp onding
SiFive HiFive1 board. The reported accuracy varies
depending on the actual benchmark from -1 0.9% to
13.5% c lock cycles (Herd t et al., 2020).
A second example is the GVSoC VP
(Bruschi et al., 2021) which acts as a VP fo r the
whole PULP processor platform
2
. The achieved
average ac curacy of 10% is acceptable for a VP
designed for Design Space Exploration. However,
accuracy was evaluated only with one complex test-
case (MobileNet V1 convolutional neural network).
A general reliable statement on the VPs accuracy
with this evaluation approach is not possible. As al-
ready mentioned in section 3, the accuracy highly
depends on the p aths that are individually followed
through the whole system by an application software.
For reliable app roximations by the VP on the physi-
cal hardware, this accuracy comp arison has to be re-
peated for each individual software application. Even
worse, this comparison is necessary after each major
change of the software in its development process.
To counter this problem the authors propose a
modified approach for determining (in-) a ccuracy in
VPs in the next section.
5.1 Proposed Solution
The key idea is to automatically determine the indi-
vidually encountered inaccuracy and report it to the
user of the VP. All time deviations in each modeled
component have to be determined by the VP devel-
oper and than included in its source code for trac-
ing. Costly accuracy be nchmarks done by every VP
user for its ind ividual SW application can therefore be
completely avoided.
For buses, this trace adds up the inaccuracy for
each executed transaction over all involved bus com-
ponen ts (e.g. arbiter) between master and slave. All
sources of inaccuracy have to be located and quanti-
fied at least in well defined intervals. For the localiza-
tion of possible inaccuracy in bus modeling via TLM,
a short overview was already given in section 4. The
challengin g p a rt is the qu antification of the modeling
error. There are two kinds of sources for these errors,
namely static and a dynamic ones.
Static erro rs occu r ind ependen tly of any dynamic
events on the bus peripherals. An example is a archi-
tectural constraint in the master that introduce a static
number of wait cycles, b e fore the data for a new burst
beat can be outputted on th e bus. A modeling error
does not need any tracing here, since a refinement of
2
https://pulp-platform.org/