Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

IOWR problem

Honored Contributor II

Hello every body 

I have problem in using the IOWR function in my code; 

the problem is my code doesnot work when I write on base address 0 in my hardware as: 

IOWR(AES_0_BASE,0,0); // doesnot work 

but it work if i changed the base address to 32 as 

IOWR(AES_0_BASE,32,0); // work proberly 


however it also didnot work if i use :# define Cipherkey2_BASE AES_0_BASE+32 


and i canot write on this base address as follow 


IOWR(Cipherkey2_BASE,32,0); // doesnot work 


what is the problem.
0 Kudos
1 Reply
Honored Contributor II

At a guess the address offset is sometimes multipled by 4. 

The last line you are also trying to add the offset twice. 

Personally i don't think the Altera IOWRxxx() do anything other than hide what is going on. 

I also suspect you want to do 32bit accesses, I thought there was an IOWR32().