- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When a CPU master needs to access a slave device, the software# include's "system.h" which contains all the system addresses.
Is there an equivalent for custom avalon masters written in VHDL? I would like my master device to be able to automatically locate the memory it should get it's data from, without requiring hardcoded constants which need to be changed each time I fiddle with the system memory map. (My question is the same as this old one here: alterauserforums. org/forum/showthread.php?p=20564 )Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may be able to do that with a TCL script, but usually the way this is done is by having the CPU configure the component at run time.
You can have both an Avalon master and an Avalon slave on your component, and have a few registers accessible from the slave that define the addresses to use on the master.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>but usually the way this is done is by having the CPU configure the component at run time.
Ah yes - that seems like a better solution. I'm a little short of logic elements on this design, so how many extra logic elements do you think it would add? (I already have a slave config interface...) I was assuming a constant address would use next to no logic elements, but a variable address would involve a storage register for the base address, and an extra 32-bit adder to add together base+offset for each memory access - with all the connecting logic that would be about 100 LE's, which seems like quite a lot...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it should take at least a 32-bit register and an adder. I didn't know you were that low on resources.
The alternative would be a tcl script that reads the .ptf or .sopc file to extract the required base address and write it back in an HDL file. But I don't know if it has been done already, so you may not be able to find any example on how to do that.
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