On Mon, Sep 8, 2014 at 8:28 PM, Ricardo Nobre <[email protected]> wrote:
> Thanks! :-)
>
> I get the following output for one of my kernels:
> Success! Got NOP_EXIT. Exiting (608812)
> Simulation ended at PC = 000031dc (608813)
>
> So basicaly I just have to divide 608813 by 2 to get the clock cycles?
> Does this provide a cycle accurate result?
Yes, this is the accurate number of cycles (the divided by 2 result)
of the entire simulation run.
>
> What is the different between doing this and "more fine-grained
> measurements" using the l.nop hacks?
> If the other method is already cycle accurate then what would I gain by
> going with the second method?
>
I just meant that if you for instance wanted to measure the number of
clock cycles spent in some particular area of your code instead of the
total sum of cycles, then you would have to add some extra
functionality.
I.e. let's say you wanted to measure number of cycles spent in foo(),
then you could do:
asm("l.nop 5")
foo();
asm("l.nop 6")
under the assumption that you add the needed functionality for
NOP_CNT_RESET and NOP_GET_TICKS in tb.cpp
If the total sum of cycles is what you need, then the number above is
sufficient.
Stefan
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc