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.

c code to write a register

Altera_Forum
Honored Contributor II
839 Views

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 II
82 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