Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

m_state == STATE_DEBUG Error

Altera_Forum
Honored Contributor II
1,856 Views

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 II
501 Views
0 Kudos
Altera_Forum
Honored Contributor II
501 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.

0 Kudos
Altera_Forum
Honored Contributor II
501 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.
0 Kudos
Altera_Forum
Honored Contributor II
501 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.

0 Kudos
Altera_Forum
Honored Contributor II
501 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
501 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
501 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).

0 Kudos
Altera_Forum
Honored Contributor II
501 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
0 Kudos
Altera_Forum
Honored Contributor II
501 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 :)

0 Kudos
Altera_Forum
Honored Contributor II
501 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....
0 Kudos
Reply