Altera_Forum
Honored Contributor
9 years agoMAX 10 weird behaviour
Hey,
I kindly ask for your help as I'm totally lost. Device: MAX 10 10M50DAF256I7G The situation: I have a design that includes a Nios II/f processor and a software written to run on it. Everything works fine. But when I make the smallest change in the design (not in the software, and not in the Nios) - it stop working! . The change could be anything , even a pin assignment, and it wouldn't work anymore. If I undo the change, everything works again. I can make another change and it might work and might not work ( not work = nios application not running ) . the interesting part is , that if I run the software through debug mode, it works all the time. and i can't see why a change on the "Hardware" side affect the application running or not. For example: I make the following change: add an output to a led -> software won't work. I make another change: connect the led to a switch -> everything works again. Do you think the issue is the flash? its addressing? maybe memory initialization? Appreciate your assistance, Thanks, Eyar Solution: With the kind help of Elhanan Sharon (@imported_elsharon) and Eyal Sharon we solved the problem. The issue had to do with a redundant bus from the processor - flash_instruction_master. All the settings had the Nios software loading from RAM except this and it is unclear why it sometimes worked with that bus present. To remove that bus we needed to go t the parameters window of the Nios II processor component in Qsys -> Caches and Memory Interfaces tab -> Flash Accelerator -> set Line Size to None (was 128 bits before). Now that this line is gone the only instruction bus present is the instruction_master and it is connected to both memory.s1 and flash.data and only to those. After regenerate and recompile everything (Quartus, Qsys, BSP in Eclipse) - things worked and they keep working. Worth noting is that we used the System Console (opens from eclipse -> Nios II menu) and the Tcl language to debug and understand the Nios processor state and come to conclusions and it was very handy.