Digital Signal Processing Reference
In-Depth Information
while(1) {
switch( function ) {
case 0x1: /* Test the LCD display */
#ifdef LCD_NAME
printf("Testing LCD Display\n" );
lcd_init();
ret_val = test_lcd();
printf("...Completed.\n" );
#else
printf("No LCD Component is Present\n" );
#endif
break;
case 0x2: /* Test the SRAM */
printf("Testing SRAM\n" );
ret_val = test_sram();
printf("...Completed with %d Errors.\n", ret_val );
break;
case 0x4: /* Test the Flash memory */
printf("Testing Flash Memory\n" );
ret_val = test_flash();
printf("...Completed with %d Errors.\n", ret_val );
break;
case 0x8: /* Test the SDRAM */
printf("Testing SDRAM\n" );
ret_val = test_sdram();
printf("...Completed with %d Errors.\n", ret_val );
break;
default: /* Do nothing */
break;
}
function = 0;
switches = IORD_ALTERA_AVALON_PIO_DATA( SWITCHES_BASE );
IOWR_ALTERA_AVALON_PIO_DATA( LEDS_BASE, switches );
usleep( 50000 );
}
return(0);
}
Figure 16.20 continued
16.16 Downloading the Nios II Hardware and Software
Projects
To execute your software on a Nios II processor, you must configure the FPGA
with the Nios II hardware reference design and then you can download the
compiled program code to the processor's program memory.
Connect the USB cable. Verify that the Run/Prog switch on the DE board is set
to Run , and then turn on the DE board. Select Tools Quartus II
Programmer… to configure the FPGA. When the Quartus II Programmer
appears, click on Add File… and select the rpds16.sof file from your project
directory. Click Open to add the selected file to the download chain. Check the
Search WWH ::




Custom Search