Altera_Forum
Honored Contributor
15 years agoHELP!!- NiosII Error message and customized SRAM
Hi,
I am a beginner on NiosII. I was recently attracted very much by new features provide by series of new development tools. I am currently facing two problems. I have spent more than one week on trying to solve the two problems, but no progress. That may be because I still didn’t understand the whole system deeply. I hope the experts/professionals here could help me out. Thanks in advance. my developing environment: - QuartusII 10.1 - Modelsim 6.6C - NiosII for Eclipse 10.1 - Windows XP Chinese version - Target hardware: CycloneIII EP3C16F484 + two 16bits SRAM(connected as 32bits system, IS61WV25616) + 40M external clock + Jtag - 1. first problem – errors come out when run helloworld The HelloWorld project is estabilished as “NiosII Application and BSP from Template”. It could be built successfully. but when I try to run the program, the following error message come out: **CPU Master Group not set **CPU Architecture Type not set **The SOPC design doesn’t contain a CPU of a supported architecture. **CPU module not set But the program can be run correctly with these error messages. I can see “Hello World” in Console window. I tried another program which is programmed by myself. It is simply to drive on/off the two LEDs on target hardware. It could be built correctly. When run, the same error message comes again. But still it seems could be run correctly. I can see the two LED are driven on/off as designed. Does anybody know the root cause of the problem? How to fix it? 2. second problem – could not use customized sram correctly. As indicated as above, I use two 16bits SRAM one 32bits system. I tried two methods to build customized SRAM #1 connect the two SRAMs onto Avalon tri-state bus and then define signal and interface as following iCLK clock_sink clk 1 input ADDR conduit_end export 19 output DATA conduit_end export 32 bidir nLB1 conduit_end export 1 output nLB0 conduit_end export 1 output nUB1 conduit_end export 1 output nUB0 conduit_end export 1 output nCE conduit_end export 1 output nOE conduit_end export 1 output nWE conduit_end export 1 output iADDR Avalon_tristate_slave address 21 output iDATA avalone_tristate_slave data 32 bidir inWE avalone_tristate_slave write_n 1 input inOE avalone_tristate_slave read_n 1 input inCE avalone_tristate_slave 1 chipselect_n input inBE avalone_tristate_slave 4 byteenable_n input the vhdl code: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; library std; use std.textio.all; entity NewComponents is port ( --Avalon side signal iADDR: IN STD_LOGIC_VECTOR(20 downto 0); signal iDATA: INOUT STD_LOGIC_VECTOR(31 downto 0); signal inBE: IN STD_LOGIC_VECTOR(3 downto 0); signal inCE: IN STD_LOGIC; signal inOE: IN STD_LOGIC; signal inWE: IN STD_LOGIC; signal iCLK: IN STD_LOGIC; --Output Port signal ADDR: OUT STD_LOGIC_VECTOR(18 downto 0); signal DATA: INOUT STD_LOGIC_VECTOR(31 downto 0); signal nLB0: OUT STD_LOGIC; signal nLB1: OUT STD_LOGIC; signal nUB0: OUT STD_LOGIC; signal nUB1: OUT STD_LOGIC; signal nCE: OUT STD_LOGIC; signal nOE: OUT STD_LOGIC; signal nWE: OUT STD_LOGIC); end entity NewComponents; ARCHITECTURE BEHAVIOUR of NewComponents IS BEGIN nLB0 <= inBE(0); nLB1 <= inBE(1); nUB0 <= inBE(2); nUB1 <= inBE(3); nCE <= inCE; nWE <= inWE; nOE <= inOE; ADDR(0) <= iADDR(2); ADDR(1) <= iADDR(3); ADDR(2) <= iADDR(4); ADDR(3) <= iADDR(5); ADDR(4) <= iADDR(6); ADDR(5) <= iADDR(7); ADDR(6) <= iADDR(8); ADDR(7) <= iADDR(9); ADDR(8) <= iADDR(10); ADDR(9) <= iADDR(11); ADDR(10) <= iADDR(12); ADDR(11) <= iADDR(13); ADDR(12) <= iADDR(14); ADDR(13) <= iADDR(15); ADDR(14) <= iADDR(16); ADDR(15) <= iADDR(17); ADDR(16) <= iADDR(18); ADDR(17) <= iADDR(19); ADDR(18) <= iADDR(20); process(iCLK) begin if(iCLK'event and iCLK = '1')then if(inCE = '0' and inWE = '0')then DATA <= iDATA; elsif(inCE ='0' and inOE ='0')then iDATA <= DATA; else iDATA <= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; DATA <= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; end if; end if; end process; End BEHAVIOUR; Then build and run “HelloWorld”, below error messages appeared: **Downloading ELF process failed I guess this because the SRAM is not run. Another strange thing I found is that the Avalon interface of iDATA[31..0] appeared in symbol when I checked in quartusII. This has alreadybeen defined as Avalon interface, so I think it should not be on component port. #2 I connect the two SRAM onto Avalon_slave, not tristate. I defined two data bus, one is for input and another for output. The runing result is the same as# 1. Could somebody told me where are mistakes? Sorry for the long email. I could not paste pictures, so I have to describe in words. I am waiting for answers. Thank you all. Jeffrey