|
Message
From: duca at cs.pub.ro<duca@c...>
Date: Thu Feb 21 13:27:43 CET 2008
Subject: [openrisc] Printf using OR1K C test and verilog.
Hi, Maybe this helps: www.da.isy.liu.se/courses/tsea02 lab0-4 hw_sw\lab0-4\hw\monitor\firmware\src\printf.c Copyright 2001, 2002 Georges Menie (www.menie.org)
Regards, Laurentiu Duca http://prof.cs.pub.ro/~duca
Quoting Rahul Wagh <rahul.wagh@m...>:
> 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 > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > >
--
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
|
 |