Forum Discussion
Altera_Forum
Honored Contributor
13 years agoIf your instruction has writerc low, then the cpu fabric doesn't do anything with any value on the 'data out' lines at the end of the instruction.
What the c[4:0] bits are then used for is entirely up to the implementation of your custom instruction. You could choose to use them to index some local register file, OTOH you could use them for anything else you want to - maybe as an internal opcode. I'd consider using the c[4:0] bits (with writerc low) to determine what to do with the A and B values. And the b[4:0] bits (with writerc high, readrb might as well be low) to determine which value to return. Or some similar scheme. You might want to use a second combinatorial custom instruction for the reads, that would avoid the 'late result' penalty.