[Disksim-users] System Level Simulation

kolla purushotham kollapurushotham at gmail.com
Sun Dec 18 03:20:07 EST 2011


Guys,

First of all let me thank Peter :). This is what I ended up with to make
the system level simulation work in an asynchronous way (so that some one
can use it as a reference).

while(fgets(line, 200, tracefile))
{

    sscanf(line, "%lf %d %d %d %d \n", &r.start, &r.devno, &r.blkno,
&r.bytecount, &r.flags);
    printf("%lf %d %d %d \n", r.start, r.devno, r.blkno, r.bytecount/512);
    fflush(stdout);
    nextiotime = r.start;

    while((nextiotime >= next_event) & (start == 1))    // used start as a
flag to mark it as a first time entry to the loop.
    {
        currtime = next_event;
        disksim_interface_internal_event(disksimIntr, currtime, 0);
    }
    {
        start = 1;
        currtime = nextiotime;
        disksim_interface_request_arrive(disksimIntr, currtime, &r);
    }
}

-- 
Regards,
Purushotham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20111217/15123e1d/attachment.html>


More information about the Disksim-users mailing list