Folks,I've managed to get the Nios II simulating in ModelSim per AN 351 with the Hello World example app. Now I'm trying to get the example memory test app to run and I'm running into problems. First, the interactive terminal doesn't accept user input from the keyboard. Anybody run into that? I created a new function in memtest.c that removes the user input and just attempts to run the tests on the external flash.
strcpy(flashname, EXT_FLASH_NAME); fd = alt_flash_open_dev(flashname);However, the alt_flash_open_dev() function returns an error: ERROR: Could not open /dev/ext_flash I'm not sure what I'm missing here. Anyone have any pointers? I'm using Quartus II v.10.1, Nios2EDS v.10.1. Thanks.
I don't think a model of any type is generated for the flash device. You'd have to provide one yourself (perhaps, from the manufacturer).Cheers, slacker
Interesting. So the jtag_uart module apparently loads input values from a .dat file in the sim directory:Embedded Peripherals IP User Guide:
Simulated Input Character Stream You can enter a character stream that will be simulated entering the read FIFO upon simulated system reset. The MegaWizard Interface accepts an arbitrary character string, which is later incorporated into the test bench. After reset, this character string is pre-initialized in the read FIFO, giving the appearance that an external JTAG terminal program is sending a character stream to the JTAG UART core.So does that mean the simulation model will not accept input from the keyboard? If the contents of the .dat file is read in after reset, you can't really simulate the user inputs to the queries by the memory test software.