|
Message
From: rich_daddio at yahoo.com<rich_daddio@y...>
Date: Mon Feb 25 21:23:32 CET 2008
Subject: [openrisc] Printf using OR1K C test and verilog.
Hi Rahul, Guess I am missing something here, could you send me some snips offline of what you see (rich_daddio@y...) and what you think is going wrong and I will take a look.
Thanks & Best Regards,
Rich d
----- Original Message ----- From: Rahul Wagh<rahul.wagh@m...> To: Date: Fri Feb 22 13:41:13 CET 2008 Subject: [openrisc] Printf using OR1K C test and verilog.
> Hi Rich, > > Thanks for your inputs. Well, I have already looked into the > section that you have mentioned. I tried to use the frame-pointer, > stack-pointer related info given there to trace the arguments. But > I did not get any success. I figured out that once you say > something like : <printf("A = %d",a_value);> , the > 'a_value' first gets stored in GPR R3. You can see this in the GPR > dump created by or1200_monitor.v. However, when the actual call to > the printf in support.c happens, the R3 gets overwritten. After > that, I do not have a clue as to where does the argument 'a_value' > go. Thats where I am stuck as of now. > > Thanks, > > Rahul. > > -----Original Message----- > From: openrisc-bounces at opencores.org [mailto:openrisc-bounces at > opencores.org] On Behalf Of rich_daddio at yahoo.com > Sent: 22 फरवरी 2008 05:01 > To: openrisc at opencores.org > Subject: Re: [openrisc] Printf using OR1K C test and verilog. > Hi, > I am not sure if this is what you are looking for but take a look > at > OpenRISC 1000 Architecture Manual under "Function Calling > Sequence" > and the table of registers, and that might help you. > http://www.opencores.org/cvsweb.shtml/or1k/docs/openrisc_arch.pdf > HTH & Best Regards, > Rich d > ----- Original Message ----- > From: Rahul Wagh<rahul.wagh at m...> > To: > Date: Wed Feb 20 09:14:25 CET 2008 > Subject: [openrisc] Printf using OR1K C test and verilog. > > 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 > >
|
 |