Altera_Forum
Honored Contributor
14 years agoProcessor stuck at reset?
Once upon a time, I had this code working, so I know the code is good.
As I have been made the honorary NIOS II guru at work, I have been tasked with learning all I can so I can teach my boss. I had some code that I managed to make work in both Modelsim and on hardware. It can R/W to mem and light up some LEDs...simple. I decided to add a flash chip so that I can play around with having an FPGA image and software programmed into the chip. After abject failure (every method I've tried to get the flash to program the chip properly and run the software crashed and burned...another issue for another thread) I decided to go back to the previous design. I removed the generic tristate controller and bridge from Qsys, rebuilt the system, changed the C code back to the previous address mapping, rebuilt the code, regenerated the BSP, regenerated the .hex files (a whole other issue), recompiled the project in Quartus, and programmed the .sof file into the FPGA. Now all of my LEDs just stay lit, and nothing happens. Simulating things in modelsim show me that the processor just never does anything useful. It just seems to go through the reset vector, to do some things that look like stack or heap initialization, and then do some other things that look like housekeeping. Then it repeats that process endlessly. It never seems to find my code, and I just don't understand why. Using the debugger doesn't seem to have any value, because it never gets to my code, so it never seems to find my breakpoints. Just arbitrarily pausing the debugger at any point shows that the processor is at 0x0000000 (which happens to be where my reset vector is, but I've moved the reset vector by changing the offset of the instruction memory and the debugger still stops at 0x000000, so I know its not stopping at the reset vector). It just doesn't seem to be doing anything. The system right now is a NIOS II/e (not having the cache makes it easier to follow instructions in modelsim), 3 on-chip memories (1 instruction, 1 data, 1 r/w test mem) and a pio for the LEDs. That's it. Any suggestions? This NIOS stuff is making me feel like I live on this forum. Thanks in advance for any help!!!! O! And for the record I'm doing this with a Cyclone III starter board. I have all of the pins connected according to the datasheet and all of the unused pins are set to inputs tristated.