Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12595 Discussions

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

Altera_Forum
Honored Contributor II
1,317 Views

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 II
392 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'.

0 Kudos
Altera_Forum
Honored Contributor II
392 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".
0 Kudos
Altera_Forum
Honored Contributor II
392 Views

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

 

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.
0 Kudos
Reply