Forum Discussion
Dual Port Nios V BSP error
I've created a Nios V qsys with dual port onchip memory in Quartus Pro 26.1
True dual port, first port connected to instruction manager, second - to data manager.
Base addresses automatically assigned the same to both.
But i'am unable to create the BSP due to memory regions overlapping error!
Of course the addresses are same - its the same physical onchip memory!
Any solytion, please?
Regards, Vlad.
10 Replies
- SteveK_Arrow
New Contributor
Hi Fabian
Internal discussions with the engineering team are ongoing. I am not certain what the resolution will be. I will update this thread if there is more information.
Regards
- FabianL
Occasional Contributor
Hi Steve, did you already get any answers from the engineering team?
best regards
Fabian
- SteveK_Arrow
New Contributor
Hi Fabian
This is the response I received from the factory.
"In Quartus Prime Pro 26.1, the BSP Editor presents your true dual-port onchip RAM as two separate memory devices:
- intel_onchip_memory_0_s1 (instruction / .text / reset path)
- intel_onchip_memory_0_s2 (data path: .bss, .heap, .rodata, .rwdata, .stack)
Both are reported at base address 0 with length 32,768 bytes, so the editor flags overlapping memory devices and marks the BSP as not valid. That matches what Fabian described on the forum: Pro lists dual-port OCM as two BSP devices (s1 / s2), while Quartus Prime Standard presents the same hardware as a single memory device connected to both instruction and data.
This is how we treat this on Pro today:
For Nios V BSP generation on Quartus Prime Pro, each slave port that appears in the BSP memory list is validated as its own memory device. If two of those devices share the same (or overlapping) address range, BSP creation fails. There is no published Pro fix that collapses true dual-port OCM into one BSP device the way Standard does. Prior Embedded guidance for this class of failure is: do not leave instruction and data views of the same physical memory as two overlapping slaves in the Pro address / BSP map.
Interim options:
1. Preferred for Pro BSP: use separate onchip memories for instruction and data instead of one true dual-port block shared by both managers at the same base address.
2. If you must keep dual-port hardware: assign non-overlapping base/size for the two ports in Platform Designer, then map linker sections across the two non-overlapping BSP memory regions. This can allow BSP create to succeed, but it splits the contiguous map and reduces usable shared memory efficiency (same tradeoff noted on the forum).
3. Avoid any instruction/data bridge topology that creates an additional overlapping slave view of the same physical RAM in the system address map."
- FabianL
Occasional Contributor
Hello Steve,
thanks for the confirmation. Is a fix for this issue planned in a future Quartus release and if yes for which?
With limited FPGA RAM ressources available an efficient memory usage model for NIOS applications is inevitable.
best regards
Fabian
- FabianL
Occasional Contributor
Hello,
any news on this topic?
best regads
Fabian
- SteveK_Arrow
New Contributor
Hi Fabian
Thanks for the detailed update. I have notified the factory and will provide an update when it is available.
Regards
Steven
- FabianL
Occasional Contributor
I can confirm, that I run into the same Problem using Quartus Pro 25.3 & 26.1
However, if I use Quartus 25.1 Standard, the Memory appears correctly as a single memory.
I have made no changes to the .qsys Design. I started with a Quartus Standard .qsys design (Arria 10) and then coverted it to Quartus Pro automatically.
In both variants I created a new .bsp from scratch.
Quartus Standard result:
Quartus Pro result:
Why is the Standard version achieving the correct results, while the Pro version is messed up?
The Problem is that the Memory appears as 2 memories devices in the Pro version. Not the linker memory region (this can be modified) but the underlying memory device (I have found no option to edit the automatically generated memory devices).
In the Standard version it appears as
- single memory device
- connected to data & instruction
In the Pro version the same dual port memory appears as:
- 2 individual memory devices
- 1 connected to instruction (s1)
- 1 connected to data (s2)
This also prevents e.g. mapping .txt section s2 memory device and .rwdata to s1 memory device.
Assigning different addresses for the 2 ports is not enough. Also the linker memory region must be split, so data does not overwrite code. This fragmentation must be setup before compilation, which significantly reduces memory efficiency.
A working solution for the Pro version would be great.
best regards
Fabian
- SteveK_Arrow
New Contributor
Hi Vlad
You can manually select a different address for the s2 port of the dual port RAM that does not overlap the address for port s1. This will resolve the issue. Double click in the base column of the s2 port to modify the address. I built an example to verify this and have inserted a few snapshots below.
- sonycman
New Contributor
Yes, but would that be working solution regarding software, linker would see those memories as different, but those are the same actually! It must be just single memory for the compiler/linker to utilize it properly.
It needs to be tested in practice, thank you for suggestion.
There might be another solution - to generate BSP for common single port memory, and then change just the memory to dual port and regenerate hardware leaving the BSP intact. A workaround, kind of...
- SteveK_Arrow
New Contributor
The instruction and data masters of the Nios have their own memory maps, so it should be legal to connect them to two different memories that have the same base address. I modified the design to use two separate single port memories (with the same base address). The instruction master connected to the first memory and the data master to the second. I got the same error in the bsp editor.
Even though my previous suggestion passed through the tools without error, it would cause a problem since the bsp editor might assign linker sections that actually overlap on the physical memory itself.
The workaround that you suggested might be ok. It would have to be tested.
I will open a case with the factory to see if i can get an explanation regarding the bsp editor errors.