Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- thanks fheineman, i cant see your attached text file.Could you post again? im using Quartus II 11.0sp1 Web Edition (32-Bit) --- Quote End --- Sorry, not sure what happened there. I'll just put the text below. Good luck... 1. Launch your FPGA design in Quartus II 11.0 sp1 2. Open the Quartus II Programmer and program your FPGA with the current .sof file. 3. Open Qsys and load your Qsys design 4. Under Tools menu select System Console 5. Expand the Tcl Console window as this is the only window you will need. 6. At the % prompt type (or cut and paste this):
 "set mypath [ lindex [ get_service_paths master ] 0 ]" 

You should get a path statement something like this:
 "/connections/USB-Blaster on localhost [USB-0]/EP3C25|EP4CE22@1/[MFG:70 ID:34 INST:0 VER:3]/cpu" 

 This establishes the JTAG UART connection path to the Nios II processor. If you don't see this then the JTAG UART connection is broken. That is another can of worms not addressed by this document. You must fix that before proceeding. This is often due to timing issues in your Quartus design. TimeQuest is the tool for that...
 7. At the % prompt type (or cut and paste this): "
open_service master $mypath" 

 This opens the connection to the Nios II processor.
 8. At the % prompt type (or cut and paste this): "
processor_stop $mypath

" This stops the Nios II processor so it is now out of the picture.
 9. At the % prompt type (or cut and paste this): "
master_write_memory $mypath 0x01000000 [ list 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x78 0x79 0x80 0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 0x89 ]" 

 This writes 80 bytes of 8-bit Hex data to the address specified. this example uses 0x01000000 as the SRAM address. You MUST set this to an address within the range of the memory in your system that you want to test. 
 10. At the % prompt type (or cut and paste this): "
master_read_memory $mypath 0x01000000 80

" This reads back the data that you wrote to memory in the previous step. Don't forget to change the address to the same as the previous step.
 11. You should see this:
 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x78 0x79 0x80 0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 0x89 There are many other commands that you can use with the System Console to test the memory and other hardware functions in your system such as master_write_16 and master_write_32. At the % prompt type: "help help" to get a list of all the commands. For more information of any command type "help <command name>" at the % prompt. Happy Testing !!!