Guys,<div><br></div><div>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). </div><div><br></div><div>
<div>while(fgets(line, 200, tracefile)) </div><div>{</div><div><br></div><div> sscanf(line, "%lf %d %d %d %d \n", &r.start, &r.devno, &r.blkno, &r.bytecount, &r.flags);</div><div> printf("%lf %d %d %d \n", r.start, r.devno, r.blkno, r.bytecount/512);</div>
<div> fflush(stdout);</div><div> nextiotime = r.start;</div><div><br></div><div> while((nextiotime >= next_event) & (start == 1)) // used start as a flag to mark it as a first time entry to the loop.</div>
<div> {</div><div> currtime = next_event;</div><div> disksim_interface_internal_event(disksimIntr, currtime, 0);</div><div> }</div><div> {</div><div> start = 1;</div><div> currtime = nextiotime;</div>
<div> disksim_interface_request_arrive(disksimIntr, currtime, &r);</div><div> }</div><div>}</div><div><br></div>-- <br>Regards,<br>Purushotham<br>
</div>