- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have not written code to do this yet, but I thought I would describe my plan here in the hope that any experts present might give me a heads up on any possible problems.
I have a NIOS gathering data and placing it into the FPGA attached (16 bit bus) SDRAM. The HPS monitors and reads data from the SDRAM through the AXI bridge. Provided 32 bit words are written / read atomically I will have no problems. However I am somewhat worried about the SDRAM being attached by a 16 bit interface. I am not familiar with the details but expect that a 32-bit transfer from the NIOS to the SDRAM results in two (!) writes to the SDRAM. What if the HPS tries to read exactly in the middle of this write by the NIOS? Is it possible I could read half the old word and half of the new one? Or is the bus clever enough to make sure this does not happen? Many thanksLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should be handled by the memory controller which should arbit the ports to it to enforce the correct functionality...
So from the view of the NIOS a read/write is atomic. If you have a bursting Core with e.g. a 128-bit Avalon-MM Interface with 32 bursts and the controller is able to handle that, than a burst of 32 128-bit words should be seen as atomic... And the 16-bit Interface is "only" the physical view of the RAM-Interface...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK so If I have understood you correctly the HPS will never read a half written word from the NIOS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my point of view this should be correct...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, thanks for the replies. I'll be coding / testing soon!

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