Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI think you're getting confused as to what to use to do what you want.
If you want to develop C code, in Eclipse, I recommend you use the standard PIO peripheral - where we started with this thread. You can then develop your application entirely in C code, within the Eclipse environment. This way there would be no need for any custom rtl. The rtl you posted could be used (subject to it working, I've not checked it ;)) if you want to capture the keystrokes in hardware - a commendable way of solving this. However, if you then wish to use this code as a Nios peripheral then you will need to add an appropriate interface to that code. Or, you could use your rtl to drive a PIO peripheral set as 4-bit, input only, driven by the 'keyboard_val' signal from your rtl. Rhetorical question: What are you most comfortable coding? If you're happy writing rtl do it that way, minimisung the amount of C code you have to write. If you prefer writing C, use qsys/systembuilder to implement the logic and write the solution in C, within Eclipse. Regards, Alex