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++
Announcements
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.
12452 Discussions

Accessing Inputs Outputs of custom component

Altera_Forum
Honored Contributor II
780 Views

Hello every body; 

I have created my custom compnent caled "cipher", it takes 2x128 bits input and produce one 128bit ouput, the component definition in system.h is: 

 

# define ALT_MODULE_CLASS_Cipher_0 Cipher# define CIPHER_0_BASE 0x201020# define CIPHER_0_IRQ -1# define CIPHER_0_IRQ_INTERRUPT_CONTROLLER_ID -1# define CIPHER_0_NAME "/dev/Cipher_0"# define CIPHER_0_SPAN 32# define CIPHER_0_TYPE "Cipher" 

 

 

My Quistions are: 

1-what is the address of the inputs and outputs. 

2-how can i access them if i want to pass and read the inputs and the outputs as 4x4 array. 

Thanks.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
81 Views

The address of your component is CIPHER_0_BASE. To access it, you can either use pointers (if you have a data cache, remember to use alt_remap_uncached() on the pointer address) or the IORD() IOWR() macros.

Reply