Altera_Forum
Honored Contributor
8 years agonios with custom fpga logic
Hello everybody. I am trying to set up a simple example where I implement a simple XOR gate in fpga logic. Then in C code written for the NIOS processor, I will pass several numbers to be XOR'd, and read back the outputs.
I am following this example: https://www.youtube.com/watch?v=moc3erbiugy&t=75s. My example would appear to be working, except I read back 0 with the IORD command every time. I write to the base address for my XOR gate (0 offset), and read back from that same address in the next line of main.cpp. Am I reading the XOR result from the correct memory address (i.e. same as write address)? Is there an error in how I pass the numbers to the 2 adder inputs? I am attaching screenshots of: 1. main.cpp (NIOS) 2. 2 modules I use to implement a simple XOR gate. 3. screenshot of QSYS set-up. I appreciate any ideas thoughts on this. I am puzzled. There are no error messages in the NIOS console/eclipse. Thanks, Matt