Altera_Forum
Honored Contributor
20 years agoInternal Register File (Custom Instructions)
Hello.
I'm a (very) beginner of NiosII and VHDL, and have just managed to make a sample custom instruction (Combinatorial) like the following, thanks to ug_nios2_custom_instruction.pdf. unsigned char input[BUFF_SIZE], output[BUFF_SIZE]; : for(i=0; input!='\0'; i++){
output = (unsigned char) ALT_CI_PROC_ONE_CHAR((int)input[i]); } : Now, I'd like to extend the instruction to deal with the strings instead of chars. I mean, something like the following is preferable. unsigned char input[BUFF_SIZE], output[BUFF_SIZE]; : ALT_CI_PROC_STRING(input, output); : To do this, I should use Custom Instructions(Internal Register File), right? Could anyone tell me where I can get the examples of VHDL for this? Or ... any other suggestions are welcome. Thanks. shino