[Disksim-users] A problem in the bus ownership grant
尹训睿
yinxunrui at gmail.com
Wed Jan 16 01:39:33 EST 2013
Hi all,
I encounter the following assertion failure using disksim-4.0:
in disksim_diskctlr.c:
in function: disk_bus_ownership_grant():
ddbg_assert(arbdelay == (simtime - currdisk->stat.requestedbus));
First, I comment this assertion, and print the corresponding values in
my simulation, finding that the failure is actually caused by the
precision problem of floating point numbers. It appears only 3 times
and my simulation runs well after that...
So I wonder if it is a bug to compare the float numbers in this way,
or there is some special purpose for this assertion?
Referring to a similar part in the source code of the SSD extension, I
comment this assertion and changed the line
currdisk->stat.waitingforbus += simtime - currdisk->stat.requestedbus;
into
currdisk->stat.waitingforbus += arbdelay;
Is that OK?
Thank you for your time!
Best regards,
Xunrui
More information about the Disksim-users
mailing list