FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6359 Discussions

Address map for 2 masters

Altera_Forum
Honored Contributor II
1,167 Views

Good afternoon, 

I've been reading for a long time in this forum, and I have resolve all my problems with it, but now I have a question that I have not seen here. I'm sharing a SRAM chip with a NIOS and some specific HW, using two Avalon MM Master IP from Altera. The issue is that I want to define two separated spaces in the SRAM, one for NIOS and the other for the data that HW will use. 

 

My SRAM has base address 0x200000, and a span of 0x1fffff (2MB). I want to define a span of 0x01ffff for NIOS and the rest for the HW. I have tried to use the Address Map in the SOPC to modify it, but it's impossible. There is another possibility to define it automatically or I must do it modifing the system.h or other generated documents? 

 

Thank you for your support. 

 

Isaac Campos
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
350 Views

Hi, 

 

I have solved this type of problem by changing into system.h file and it is easier and quick solutions. 

 

Regards, 

Hardik Sheth
0 Kudos
Altera_Forum
Honored Contributor II
350 Views

You will need to have a look at the linker script, to be sure it won't put some code, stack or heap memory in the area you want to use for HW.

0 Kudos
Altera_Forum
Honored Contributor II
350 Views

have you any documents regarding linker scripting ?

0 Kudos
Altera_Forum
Honored Contributor II
350 Views

Not really. I guess it should be somewhere in the gcc documentation. 

But the format isn't so difficult to understand. The linker script is automatically generated, and in the IDE you can find it in your syslib -> Debug -> system_description -> generated.x 

You can move it elsewhere, define it as a custom linker script in the system library properties, and modify it to suit your needs. 

But be careful, any changes to the memory mapping in your SOPC system will not be automatically transferred to the linker script any more, you would have to change it manually.
0 Kudos
Altera_Forum
Honored Contributor II
350 Views

Thank you very much

0 Kudos
Altera_Forum
Honored Contributor II
350 Views

Hi both, 

Thank you four your reply. Then, if I'm correct, I can change the "LENGTH" parameter in my generated.x document and use it as my custom script? Then I understand that the NIOS, when compile, will take it in account and will use the area defined in the generated.x file. 

 

It's correct? 

 

Thank you for your support. 

 

Isaac Campos
0 Kudos
Altera_Forum
Honored Contributor II
350 Views

Yes, that should do the trick.

0 Kudos
Reply