« Return to Thread: or1ksim 's question

Printf using OR1K C test and verilog.

by Rahul Wagh :: Rate this Message:

Reply to Author | View in Thread

Hi,

As you might have seen, when we say printf("....") in a OR1k testcase
written in C, it calls the printf routine written in support.c file. That
does not give the actual printing of the message within "..." though.
Anybody has tried that in OR1k ? Any suggestions / pointers ?

At my end, I figured out that the GPR R3 gets the starting address of the
memory location where the message in printf is stored. Using that, I wrote a
small code in verilog monitor (or1200_monitor.v) to access the memory (till
you get an ASCII equivalent of NULL or something like that) and display the
things in %c format to get the message. However, this helps only for
'pure-text' type messages. It does not work for messages like the following
:

printf("Register value = %x",reg_value);

Can anybody throw some light on how to do this ? (How does one track the
location of the arguments passed to the printf statement ? etc..)

Thanks,

Rahul.

_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

 « Return to Thread: or1ksim 's question