Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

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

Altera_Forum
Honored Contributor II
1,067 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
142 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 II
142 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 II
142 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