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: yueng<penguin00@m...>
    Date: Thu Feb 21 10:01:32 CET 2008
    Subject: [openrisc] Printf using OR1K C test and verilog.
    Top

    i don't figure out the printf either.
    so i delete all printf in my code...


    Rahul Wagh wrote:
    >
    > 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
    >
    >

    --
    View this message in context: http://www.nabble.com/or1ksim-%27s-question-tp15540185p15607205.html
    Sent from the OpenCores - RISC mailing list archive at Nabble.com.

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