Forum Discussion
Required Nios components
Hello,
I am trying to develop a very simple Nios cpu to run Hello world application. I have created a design: http://i55.tinypic.com/a29isy.jpg As You can see, I have inserted DDR2 memory to store required code. The whole system should run from altmemddr PLL. However, the EDS tool doesn't find neither sysid, nor timestamp. What is wrong with this design? I have tried to add timer, but that didn't help and afaik it is not required. DDR2 pins are OK, I have taken them from a working example from development board CD.47 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- DDR2 pins are OK, I have taken them from a working example from development board CD. --- Quote End --- Do you mean you tested the example on the same board? Or is this your custom board which pin locations have been copied from the dev board? I don't think the problem is with ddr, since debugging tools should be able to get the correct sysid even if memory is not working. IMHO it's more probable the Nios is not working. Maybe a problem with input clock or reset signal. Are you sure the fpga has been correctly configured? Anyway I'd suggest this simple method to exclude ddr: you can temporarily replace it with onchip memory; this is enough for a "Hello world" kiind of program and it will let you take away any concern regarding external connections. - Altera_Forum
Honored Contributor
I have replaced the DDR2 memory with on-chip memory (262144 bytes), but the issue somehow was 125MHz clock. I have set the 50MHz clock instead and the Nios started.
The 125MHz clock was running for sure, I have made a blinker which works either with 125MHz clock or with 50MHz clock. The development board is Cyclone III Host board from Altera (2 clocks on board + SMA IN) Now the strange problem is that the console doesn't show anything. It runs the CPU: --- Quote Start --- Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Processor is already paused Reading System ID at address 0x00081030: verified Initializing CPU cache (if present) OK Downloading 00040000 ( 0%) Downloading 00045CD0 (71%) Downloaded 24KB in 0.4s (60.0KB/s) Verifying 00040000 ( 0%) Verifying 00045CD0 (71%) Verified OK Starting processor at address 0x00040184 --- Quote End --- I've checked BSP parameters, the stdin/stdout/stderr are all set to uart_jtag, but the console screen is empty. - Altera_Forum
Honored Contributor
Can you toggle a PIO from your Nios program? This way you may know if processor is running, independently from jtag uart operation.
But first of all, is your design correctly time constrained? Did you get any critical warning during Quartus compilation? You must be careful with Nios designs using f>100MHz on CIII because timing problems can easily occur. - Altera_Forum
Honored Contributor
you can choose to ignore mismatched timestamp and sysid under run as -> run-configurations -> target connection
- Altera_Forum
Honored Contributor
--- Quote Start --- Can you toggle a PIO from your Nios program? This way you may know if processor is running, independently from jtag uart operation. But first of all, is your design correctly time constrained? Did you get any critical warning during Quartus compilation? You must be careful with Nios designs using f>100MHz on CIII because timing problems can easily occur. --- Quote End --- I will try to do that, but I've also tried to run debug. The output says, that the processor is started, but when the debug window comes up, I see the processor "terminated". I don't know why is this happening. There are 4 critical warnings because of constraints, but those are common and not familiar with Nios. Something like clock uncertainty on JTAG TCK pin, actually can't remember now the exact warning... In addition, Nios now runs on 50MHz directly from the clock, so should be fine. --- Quote Start --- you can choose to ignore mismatched timestamp and sysid under run as -> run-configurations -> target connection --- Quote End --- Yes, I know, but this is used for mismatched systems, that are familiar. E.g. You use somewhere compiled .sof file, but generate Your own Nios code. This feature doesn't work, when the core is not running. ID and timestamp fields are marked "Not found". Thanks for the help. - Altera_Forum
Honored Contributor
hi guys .........
socrates if your cpu run at 50Mhz and your ram run at 125Mhz you need to put a clock crossing bridge...... your problem seens to me a interface with your ram...... try put in you sopc cpu -> clk 62.5 (altmenddr.halfrate) jtag pio clock crossing bridge 62.5 -> 125 ram -> 125 this work fine good luck Franz Wagner - Altera_Forum
Honored Contributor
Well if You check the image I've posted in the first post, the whole system should run on 125MHz (clocked from altmemddr_sysclk). Only altmemddr instantiated PLL is feeded from external 50MHz clock, all other components, including memory and cpu, are feeded after the PLL from its output - 125MHz, so the system should work without clock bridge.
- Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
Are you sure the compiled design meet all timing requirements? In my experience it is difficult to make the NIOS CPU run over 100MHz without a pipeline bridge before the JTAG debug module.
I agree with frantz... Try to run your system at 50MHz first, and then increase the speed from there. - Altera_Forum
Honored Contributor
Probably You're right. I have set the ddr controller to run at half rate (125MHz/2=62.5MHz), doubled the burst and now Nios runs fine, no need of pipeline bridge.
Thanks for help... Time to test SGDMA! Or maybe modular sgdma is better? Still confused, I need to transfer coded video data in packets to Nios, add IP header and proceed to TSE :)