Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Nios II Avalon MM Slave Write operation

Status
Not open for further replies.

fcfusion

Full Member level 4
Joined
Mar 6, 2010
Messages
203
Helped
43
Reputation
86
Reaction score
24
Trophy points
1,298
Activity points
2,826
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?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top