Altera_Forum
Honored Contributor
11 years agoGeneric Tri-State Controller for CFI flash on terasic-de2-115
Hello All,
I'm trying to use the 8MB CFI flash of the terasic-de2-115 board. (I' using Quartus 13.0sp1) I have added these three components in order to get the flash running: Flash_generic_tristate_controller ^ | | tristate_conduit_pin_sharer ^ | | tristate conduit bridge and configured the tristate controller the following way: module assignments: embeddedsw.configuration.hwClassnameDriverSupportList altera_avalon_lan91c111,altera_avalon_cfi_flash embeddedsw.configuration.hwClassnameDriverSupportDefault altera_avalon_cfi_flash embeddedsw.CMacro.SETUP_VALUE 60 embeddedsw.CMacro.WAIT_VALUE 160 embeddedsw.CMacro.HOLD_VALUE 60 embeddedsw.CMacro.TIMING_UNITS ns embeddedsw.CMacro.SIZE 8388608u embeddedsw.memoryInfo.MEM_INIT_DATA_WIDTH 8 embeddedsw.memoryInfo.HAS_BYTE_LANE 0 embeddedsw.memoryInfo.IS_FLASH 1 embeddedsw.memoryInfo.GENERATE_DAT_SYM 1 embeddedsw.memoryInfo.GENERATE_FLASH 1 embeddedsw.memoryInfo.DAT_SYM_INSTALL_DIR SIM_DIR embeddedsw.memoryInfo.FLASH_INSTALL_DIR APP_DIR connection point assignments: embeddedsw.configuration.isFlash 1 embeddedsw.configuration.isMemoryDevice 1 embeddedsw.configuration.isNonVolatileStorage 1 I get the warning "Warning: cfi_flash: Properties (isFlash,isMemoryDevice,isNonVolatileStorage) have been set on interface uas - in composed mode these are ignored" in QSYS. Regarding to the FAQ this one can be ignored? When I download the bitstream to the target and use the "nios2-flash-programmer-gui" to write a file to the flash everything seems to work. I'm also able to read the written data back from the flash and so I think that the wireing of the IP-Core and the timing is valid. Now I want to access the flash with the standard HAL driver "altera_avalon_cfi_flash" and the standard flash functions like "alt_flash_open_dev, alt_write_flash, alt_read_flash"! But sadly when I call the function alt_flash_open_dev I always get 0 returned. When I step into this function I see that the linked list from the llist module is empty. So for me it seems that the flash is not recognized by the cfi flash driver. When I open my bsp settings file with the bsp editor and switch to the "Drivers" tab I see that the "Driver Name" is set to none for my altera_generic_tristate_controller! So my final question is why the bsp is not recognizing that I need the cfi_flash driver for my tristate controller? Do I need to add an additional prameter other than embeddedsw.configuration.hwClassnameDriverSupportDefault=altera_avalon_cfi_flash? I have my tristate controller in a qsys subsystem where also the Nios2 processor is located! Can this be a problem? I hope that somebody is able to help me. best regards Thomas