Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,433 Views

m_state == STATE_DEBUG Error

I build a SOPC system which consists of a Nios II cpu, onchip memory and jtag uart component with frequency of 100MHz driving all the components. The system works fine when I run the count binary program. However, when a PLL is added to the system, driving all the system peripherals with the PLL output at 100MHz, I got an error as shown:- 

 

 

Pausing target processor: not responding. 

Resetting and trying again: OK 

Reading System ID at address 0x00011038: verified 

Initializing CPU cache (if present) 

OK 

 

Downloading 00008000 ( 0%) 

assertion "m_state == STATE_DEBUG" failed: file "nios2debug.cpp", line 1815 

/cygdrive/c/altera/91/nios2eds/bin/nios2-download: line 595: 4100 Hangup nios2-gdb-server --cable 'USB-Blaster [USB-0]' --device 1 --instance 0 --sidp 0x11038 --id 0x6b140f9f --timestamp 1275099662 --go --tcpport none --write-pid /cygdrive/d/nios2_pll_issue/software/count_binary_100/nios2-download.pid /cygdrive/d/nios2_pll_issue/software/count_binary_100/count_binary_100.elf.srec 

 

 

Anyone has any thought of why this is happening? Please help.... 

 

 

Thanks. 

 

 

 

 

 

0 Kudos
10 Replies
Altera_Forum
Honored Contributor I
78 Views

Altera_Forum
Honored Contributor I
78 Views

Other things can cause it too. If you deadlock the fabric by either not completing a burst transaction or having a component that asserts waitrequest indefinitely that can cause this as well.

Altera_Forum
Honored Contributor I
78 Views

Hi, 

I was trying to use download an image to the board and below is the same error.  

 

 

--- Quote Start ---  

nios2-download -g linux.initramfs.gz  

Using cable "USB-Blaster [USB 2-1.2]", device 1, instance 0x00 

Pausing target processor: OK 

Initializing CPU cache (if present) 

OK 

Downloaded 5938KB in 12.6s (471.2KB/s) 

Verified OK  

Starting processor at address 0xD0000000 

nios2-gdb-server-wrapped: nios2debug.cpp:563: virtual ADI_ERROR NIOS2DEBUG::leave_debug_mode(): Assertion `m_state == STATE_DEBUG' failed. 

/home/alteradev/Altera_Suite/10.0/nios2eds/bin/nios2-download: line 601: 1936 Aborted nios2-gdb-server --go --tcpport none --write-pid ./nios2-download.pid ./linux.initramfs.gz.srec 

 

--- Quote End ---  

I tried reinstalling USBBlaster driver on Ubuntu 10.0 but it didn't help.  

 

How do I check if fabric is precompiled? and or check the components asserts waitrequest indefinitely? 

 

Thank you.
Altera_Forum
Honored Contributor I
78 Views

I would signaltap the Nios II data master interface and figure out if it's becoming stuck (read/write issued with waitrequest stuck high). If it is stuck look at the address being issued during the access and then work your way from there. It's a bit of a pain debugging this way since it requires recompilation of the design so if you can solve it down to the point that it's just any access to a particular component causing these I would move over simulation so that you can look at everything all at once.

Altera_Forum
Honored Contributor I
78 Views

getting the same error "m_state == STATE_DEBUG" any other ideas beside simulating the nios II, using design tools Version 10.1

Altera_Forum
Honored Contributor I
78 Views

That could be due to the timing problem on your memory component. Suggest you to check the memory timing.

Altera_Forum
Honored Contributor I
78 Views

If you have room for a small on-chip memory then I recommend making a small memory test program that can fit into it to test your external memory. There are templates for "memtest" and "memtest_small" that you can take a look at (maybe memtest_small will fit in your on-chip RAM).

Altera_Forum
Honored Contributor I
78 Views

This is the error what I get 

 

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 

Processor is already paused 

Reading System ID at address 0x20000088: verified 

Initializing CPU cache (if present) 

OK 

 

Downloading 10000120 ( 0%) 

Downloaded 42KB in 0.5s (84.0KB/s) 

 

Verifying 10000120 ( 0%) 

Verified OK  

Starting processor at address 0x100002B4 

assertion "m_state == STATE_DEBUG" failed: file "nios2debug.cpp", line 563 

/cygdrive/c/altera/10.0sp1/nios2eds/bin/nios2-download: line 601: 18396 Hangup nios2-gdb-server --cable 'USB-Blaster on localhost [USB-0]' --device 1 --instance 0 --sidp 0x20000088 --id 0x0 --timestamp 1307681075 --go --tcpport none --write-pid /cygdrive/d/BMSCE/MMCAS/10thJune2011/DDR3/software/hello_ddr3/nios2-download.pid d:/BMSCE/MMCAS/10thJune2011/DDR3/software/hello_ddr3/hello_ddr3.elf.srec 

 

please suggest me the solution
Altera_Forum
Honored Contributor I
78 Views

I was having same issue...and two potential causes for this are a) Burst not enabled in the CPU for Instruction and Data master b) USB blaster connection...in my case it was (a)....also be careful while enabling the burst for data master if you are using a 16 bit flash (no byte mode)...hope this helps :)

Altera_Forum
Honored Contributor I
78 Views

hi!  

I'm kinda new to this, but I got the same error so.... i was using a traineeboard altera DE2-115, and the solution for me was switching sw 19 from run->PROG. 

Might just be a noobie problem, but if it helps anyone....
Reply