Forum Discussion
I'm guessing that the signal names preceded by "master_" are your interface signals because I don't see a port list for your component. Is that correct?
Have you tried just leaving read enabled all the time and just do reads on waitrequest going low?
#iwork4intel
Yes, the signals preceded by "master_" are my interface signals. I have somehow managed to get it working. However, I have noticed some weird behavior: No matter the address I place on the master_0_address line, the state machine reads the pushbuttons' data register just fine. But if I add another PIO slave (LEDs) to the project, assign addresses, and then generate the files, then my code does not work anymore - I get 0's again. Seems like the issue is with slave addressing.
When I add the second PIO slave, Qsys assigns 0x0000_0000 to the pushbuttons, and 0x0000_0010 to the LEDs. To read from the pushbuttons' data register, I do master_0_address <= 32'b0. I am not sure if I need to add an offset to the address shown in Qsys or.. According to this document, the data register comes first, so there is a 0 offset to the address shown in Qsys.
Thanks for your help.