LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Rahul Wagh<rahul.wagh@m...>
    Date: Wed Feb 20 09:14:25 CET 2008
    Subject: [openrisc] Printf using OR1K C test and verilog.
    Top
    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.

    ReferenceAuthor
    [openrisc] or1ksim 's questionYueng

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.