Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

IORD vs. IORD_XDIRECT

Altera_Forum
Honored Contributor II
1,023 Views

Hello All, 

 

I have two custom components in my system (the components are coded in VHDL and connect to the software via an Avalon slave interface). One has reigsters of 8 bits (readdata/writedata width 8) and another of 16 bits.  

 

Both components were defined with "native addressing" since the access is register-based. 

 

While for the 8-bit component I suceed reading and writing registers using the IORD_8DIRECT and IOWR_8DIRECT macros, with the 16-bit one I don't suceed using IORD_16DIRECT and IOWR_16DIRECT. What does work for the 16-bit one is the plain IORD and IOWR. 

 

The docs have only minimal information on the differences between these macros. Can someone please elaborate ? What is going on behind the scenes (I see different assembly instructions generated), which one should be used when, how is it all connected to the native addressing vs. memory addressing, and so on.  

 

Thanks in advance !
0 Kudos
0 Replies
Reply