Forum Discussion
NIOS II and Cyclone III Remote Update
Have spent several days now searching and reading and think I am nearly there... but not quite. I am using the NIOS II core with SOPC builder. I use Quartus II for the FPGA image. This is a project I have inherited which kept the FPGA image in a ECPS64 and the software image in CFI. I have combined the two and keep them in the EPCS64. Works OK. I have been trying to get the remote update controller to work. I have put it into the core via SOPC and can read and write its registers via NIOS. I can also make it do a reconfig but it always seems to use the factory image. Has any one got a working example using the Cyclone III and NIOS II?
I use the following to read 2 of the registers... ParamValue = IORD( REMOTE_UPDATE_CYCLONEIII_0_BASE, 0x4); ParamValue = IORD( REMOTE_UPDATE_CYCLONEIII_0_BASE, 0x0); After power on both registers read 0. After reconfig command, register 0 = 1 and register 4 = 8 Any ideas please? Brain is starting to hurt!69 Replies
- Altera_Forum
Honored Contributor
Yes I followed these steps and it worked,
however I don't know if I have to open a specific file from my quartus project before to do start assembler or settle a parameter in quartus II ? - Altera_Forum
Honored Contributor
I don't know whether this is necessary, but I just do like this:
-rename epcs_controller_boot_rom_A.hex to kernel_epcs_flash_controller_0_boot_rom_synth.hex; -replace the system generated kernel_epcs_flash_controller_0_boot_rom_synth.hex with mine; -copy my kernel_epcs_flash_controller_0_boot_rom_synth.hex to the root direction of my project, and add it to the project; -then Processing->Update Memory Initialization file; -Processing->Start -> Start Assembler; now the .sof file is updated, and it is right file. - Altera_Forum
Honored Contributor
Just had to remove db and incremental db folders in my quartus project to run fitter without problems and start assembler after.
Thank you - Altera_Forum
Honored Contributor
just have another question : why after reconfig command register 4(boot adress) = IORD(REMOTE_UPDATE_BASE, 0x04) = 8 ?
while the bootloader in my second sof is pointing to the firmware at 0 if I use the original bootloader code without modification. So my register 4 shouldn't contain the value 0 ? - Altera_Forum
Honored Contributor
Could somebody could explain me please, because I don't really understand what is happening ?
- Altera_Forum
Honored Contributor
Hi Julien
I believe you are missing a point: the boot address in remote update core and the address of bootloader code are unrelated. Remote update boot address ONLY refers to the position of FPGA configuration image. The Nios firmware position is included in this FPGA configuration itself, i.e. it is defined by the bootloader code you assigned to epcs device with the hex memory initialization file. I don't know why you read 8 from the remote update address register; if FPGA reconfigures correctly probably it's only a trivial read error. Anyway, according to what I said above, you should read here the address of the currently loaded fpga image, not that of Nios firmware. - Altera_Forum
Honored Contributor
Just to be sure I well understand, in the remote update core you've the boot address
(using IORD to read remote update register like 0x04 to read the boot address) that only refers where the address of FPGA configuration image is situated by default 0. Address of FPGA configuration image that can be changed with the bootloader code (EPCS_boot_rom.hex) ? - Altera_Forum
Honored Contributor
Sorry if I look lost...
- Altera_Forum
Honored Contributor
Remote update core is something related to FPGA hardware and it doesn't know anything about Nios or whatever is implemented inside FPGA.
You could have implemented another processor instead of Nios, and this would have a different bootloading method: then, the uP bootloader is only a matter of the specific FPGA configuration and remote update core has no effect on it. In the case of the epcs controller for Nios system, the Nios bootloader is embedded in the controller core itself: this means the bootloader is encapsulated in epcs controller hw logic (sort of PROM bits) when the core is generated and fitted into the fpga image. That's why you need to assign the firmware position before generating the fpga image and you can't change it by simply modifying the remote update settings. Please let me know if you got it clearly or if you need futher explanation. - Altera_Forum
Honored Contributor
So the remote update only enables to read position of FPGA configuration image and can't change it ! if I well understand