« Return to Thread: or1ksim 's question

Re: or1ksim 's question

by yueng :: Rate this Message:

Reply to Author | View in Thread

thank you.

i just compile the c files to make a jpeg.or32
and sim -i jpeg.or32. dosn't load linux kernel.
i set a break point at the end of program. then run until it meet the breakpoint .to see how many cycles the algorithm used.

yes,there are many nops instrustion in the simulation.  and i try the optimization -o1 -o2 switch,
the result is the same ,seemed -o1 or -o2  is not changing anything.

i test or1k's perfomance with arm7 or arm9, so i use some algorithm ,for example
jpeg decode run both on or1k and arm. to see which one use less cycles.
and my result is or1ksim use 300M cycle and 200M instruction to finish a 320x240 jpegdecode  compared
with arm7 50M cycle and 40M instruction.

next will try the algorithm on the verilog simulation ,to see if has a better performance--use less cycle.


Dimitri?s Orfanos wrote:
There are many answers for these questions.
1)If you load the linux kernel on or1ksim and on the linux kernel you
run the program then of course you have more
instructions because the simulator runs and the linux kernel.
2)The openrisc compiler produces code with many NOPs in the brand delay
slots. A better compiler (I haven't try to use the optimization switches
to say the truth , I mean to use the switch -o1 ,-o2 ,etc) could put in
the delay slots more useful code not NOPs.
3)Does the simulator stops automatically the simulation or you have to
press Ctrl-C? The "exit" function that the compiler uses by default puts
the processor (here the simulator) to infinite loop(by executing NOPs)
after the normal execution of the program. So if you want to stop the
program you press Ctrl-C ,but you are not faster than the computer so
many NOPs  came again in your code.
You can check the code that was executed by seeing the file
"executed.log" that is produced from the simulator if you set the
exec_log (or exe_log , I don't remember actually) from the sim.cfg to 1.
That's all I have to say. Hope this helps.

 « Return to Thread: or1ksim 's question