- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello Guys,
I am new to Nios and uClinux I have written a simple device driver for a nios custom peripheral After configuring the peripheral ,through the driver, the peripheral writes result to on-chip memory ... but i am unable to read the new value of memory location from the application c code However , i get the correct (updated) value if i read the memory location in the driver itself If i write another application in c , just to read the particular memory location, and execute it after excuting the first application, the memory location shows the correct value So please suggest a way(s) to read the updated memory cotents in the same application Thanking in anticipation, KunalLink Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by kuni124d@Jun 29 2006, 12:53 PM hello guys,
i am new to nios and uclinux
i have written a simple device driver for a nios custom peripheral
after configuring the peripheral ,through the driver, the peripheral writes result to on-chip memory ... but i am unable to read the new value of memory location from the application c code
however , i get the correct (updated) value if i read the memory location in the driver itself
if i write another application in c , just to read the particular memory location, and execute it after excuting the first application, the memory location shows the correct value
so please suggest a way(s) to read the updated memory cotents in the same application
thanking in anticipation,
kunal
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16532)
--- quote end ---
--- Quote End --- This sounds like a cache issue. I would start looking there first. Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
set bit 31 of the memory address , ie | 0x80000000 , to uncache the access in both driver and user app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by hippo@Jun 30 2006, 07:02 AM set bit 31 of the memory address , ie | 0x80000000 , to uncache the access in both driver and user app.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16544)
--- quote end ---
--- Quote End --- Thanx , i shall follow your instructions. But , the memory location is in "On- chip" memory , which I beleive is not cached. There could be some other problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by kuni124d+jun 30 2006, 01:44 pm--><div class='quotetop'>quote (kuni124d @ jun 30 2006, 01:44 pm)</div>
--- quote start ---
<!--quotebegin-hippo@Jun 30 2006, 07:02 AM set bit 31 of the memory address , ie | 0x80000000 , to uncache the access in both driver and user app.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16544)
--- quote end ---
--- Quote End --- Thanx , i shall follow your instructions. But , the memory location is in "On- chip" memory , which I beleive is not cached. There could be some other problem <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16553)</div> [/b] --- Quote End --- Why do you mean the onchip memory is not cached? If you have d-cache in nios2, everything is cached unless you turn on bit31 of the address or use IORW macro .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TO_BE_DONE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TO_BE_DONE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
add "volatile" to your variable.
eg volatile int data;
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page