Altera_Forum
Honored Contributor
16 years agoRunning NIOS code from SSRAM
Hi,
I am trying to run a NIOS code from CY7C1354CV25 SSRAM(32 bits data line) and it is very unstable. My hardware is sharing the address and data bus with a flash device PC48F4400P0TB0E (16 bits data) and I am using the tri-state bridge from Altera to share the address and data bus only. I am using the SRAM in synchronous mode and the Flash in asynchronous mode. To save some pins in the FPGA, I also have the byte enables going to SRAM hardwired and enabled outside the FPGA. The FPGA device is Arria II GX and I am using Quartus 9.1 version. Here are the timing constraints that I have for the project: ****************** create_clock -period 10.000 -name Clk_100 [get_ports Clk] create_clock -period 20.00 -name virt_clk # ######## SRAM and Flash constrainsts# ####### # ############################################# # constraint the SRAM clock output pin create_generated_clock -name SRAM_CLK -source [get_pins {NIOS_PLL_I|altpll_component|auto_generated|pll1|clk[0]}] -divide_by 1 [get_ports {SRAM_CLK}] set_false_path -to [get_ports {SRAM_CLK}] # Tco constraint for SRAM address, byte write, byte write enable, Chip enable, and output enable set_output_delay -clock {virt_clk} -max 1.5 [get_ports {SRAM_BWEN SRAM_CEn SRAM_OEn FSM_A [*] FSM_D [*]}] set_output_delay -clock {virt_clk} -min -0.5 [get_ports {SRAM_BWEN SRAM_CEn SRAM_OEn FSM_A [*] FSM_D [*]}] # Tsu and Th constraint for SRAM and Flash data set_input_delay -clock {virt_clk} -max 3.5 [get_ports {FSM_D [*]}] set_input_delay -clock {virt_clk} -min 0.5 [get_ports {FSM_D [*]}] # Constraint for unused flash and SRAM pins set_false_path -from [get_ports {FLASH_ADVN FLASH_RSTn FLASH_CLK SRAM_ZZ SRAM_ADVn SRAM_CKEn SRAM_Mode}] *** Hardwired and open signals inside FPGA: As the SRAM chip does not have an ADSC line, I have left it open coming out of the NIOS entity. Other hardwired signal inside the FPGA are FLASH_ADVN <= '0', FLASH_RSTn <= '1', FLASH_CLK <= '0', SRAM_ZZ <= '0', SRAM_CKEn <= '0', SRAM_ADVn <= '0', and SRAM_Mode <= '0'. Here are my questions:- I have used SRAM’s timing (Tco, Tsu, Th) for constraining the data and address line. Is this correct?
- The flash device being an asynchronous device, how do I constraint it?
- I tried the memtest program from Altera to verify both Flash and SRAM devices. The SRAM data bus test and the address bus test passed and the Flash device also passed the test. This test was done by running the NIOS from on-chip memory
- Next, I changed the Exception vector in the NIOS CPU to external SSRAM and the reset vector to external Flash and tried a hello world program from Altera. The program downloaded and verified properly, but it not print “Hello World” onto the console. I have JTAG UART for STDOUT, STDIN, and STDERR in the hello_world project. What could be the issue?