Forum Discussion
Nios II PIO Stimulus input signals for simulation with Modelsim/questasim
- 4 years ago
Hello Sheng. Thank you for the response.
I solved it. The code is fine, but providing stimulus signals needs to be done in modelsim with the FORCE command.
http://www.pldworld.com/_hdl/2/_ref/se_html/manual_html/c_vcmds87.html
I was able to create a macro file(.do) which switches this stimulus repeatedly during the simulation.
Thank you,
Jacob
Hi,
Probably something is missing in the while loop.
while (1)
{
btn_in = ~IORD_ALTERA_AVALON_PIO_DATA(BUTTON_BASE);
led_pattern = ~led_pattern; //invert led_pattern
btn_in &= led_pattern;
IOWR_ALTERA_AVALON_PIO_DATA(LED_BASE,btn_in); //macro which writes led_pattern to the LED_BASE memory address
}
Best Regards,
Sheng
p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution and give Kudos.
Hello Sheng. Thank you for the response.
I solved it. The code is fine, but providing stimulus signals needs to be done in modelsim with the FORCE command.
http://www.pldworld.com/_hdl/2/_ref/se_html/manual_html/c_vcmds87.html
I was able to create a macro file(.do) which switches this stimulus repeatedly during the simulation.
Thank you,
Jacob