Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
795 Views

c code to write a register

hi,i had created a custom component "32-bit register" using sopc builder.I want to write a data into the register using NIOS-II SBT Eclipse.Can anyone tell me the entire c-code to perform writing of register using nios-ii sbt eclipse

0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
38 Views

Something like that maybe? 

#include <system.h> # include <sys/alt_cache.h> unsigned int *my_register = alt_remap_uncached((void*)MY_REGISTER_BASE); *my_register = my_value OF course replace MY_REGISTER_BASE with the actual base address value defined in system.h
Reply