fcfusion
Full Member level 4
Hi everyone
I'm using a Nios II processor connected to a very simple custom component which I call Blink. The Blink component lights up 3 LEDs on my board, and I select which LEDs I want to turn on using a very simple C program running on the Nios processor. To do this I connected Blink to Nios processor through an Avalon MM Slave connection with a Write interface, composed simply by the data bus and the corresponding write_en bit.
Now my question is: which C function am I supposed to used to send data from Nios to Blink through the Avalon interface?
I know this might sound a dumb question but the fact is googled everything I could about this and read endless pages of documentation and the only advice I found was to use the IOWR() function. I've tried it, and it indeed performs a single write but it seems to lock the Avalon interface, and I cannot perform more write operations. I suspect this function is not the most appropriate, but I'm not sure.
Any advice is welcome
Thank you guys
---------- Post added at 23:06 ---------- Previous post was at 22:45 ----------
Hi again, I have some updates on my problem. It seems to be working now.
The data input was set to 8 bit width and neither QSys, Quartus nor Nios complained about it. I read on some thread that Nios "didn't like" bus widths different from 32, but that it didn't cause only problems besides greater latency due to the conversion. Anyway I changed to 32 bit and the Avalon no longer locks and everything seems to be working ok.
Still I would like to understand what happened. Any ideias?
I'm using a Nios II processor connected to a very simple custom component which I call Blink. The Blink component lights up 3 LEDs on my board, and I select which LEDs I want to turn on using a very simple C program running on the Nios processor. To do this I connected Blink to Nios processor through an Avalon MM Slave connection with a Write interface, composed simply by the data bus and the corresponding write_en bit.
Now my question is: which C function am I supposed to used to send data from Nios to Blink through the Avalon interface?
I know this might sound a dumb question but the fact is googled everything I could about this and read endless pages of documentation and the only advice I found was to use the IOWR() function. I've tried it, and it indeed performs a single write but it seems to lock the Avalon interface, and I cannot perform more write operations. I suspect this function is not the most appropriate, but I'm not sure.
Any advice is welcome
Thank you guys
---------- Post added at 23:06 ---------- Previous post was at 22:45 ----------
Hi again, I have some updates on my problem. It seems to be working now.
The data input was set to 8 bit width and neither QSys, Quartus nor Nios complained about it. I read on some thread that Nios "didn't like" bus widths different from 32, but that it didn't cause only problems besides greater latency due to the conversion. Anyway I changed to 32 bit and the Avalon no longer locks and everything seems to be working ok.
Still I would like to understand what happened. Any ideias?