Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
972 Views

Add a custom instruction with only one input - BSP auto generated

I've just created a custom instruction in Qsys that uses only one input. There is only dataa[] in the interface. 

 

However the Eclipse generates a instruction with 2 operands. 

 

#define ALT_CI_WELLPRNG_0(A,B) __builtin_custom_inii(ALT_CI_WELLPRNG_0_N,(A),(B)) 

 

Did I do anything wrong? Or should I always fix that by hand? 

 

Thank you.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
47 Views

For your Qsys component, did you set the 'operands' parameter of the custom instruction interface to the value of '1' ? By default, it is set to '2'.

Altera_Forum
Honored Contributor I
47 Views

Thank you ted. 

 

I didn´t notice the fild when building it. 

 

And since you are here.  

 

I´m preaty sure my instruction takes only one cicle to execute. But I can´t change the field to "Combinational" only "Variable".
Altera_Forum
Honored Contributor I
47 Views

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/ug/ug_nios2_custom_instru... 

 

Does your interface described in your _hw.tcl look like Figure 3, or Figure 5 ? Try removing extra signals if it looks like Figure 5.
Reply