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++

Custom Instruction and ALU

Altera_Forum
Honored Contributor II
1,375 Views

Hi all, 

 

In an embedded project I am developing I have implemented 2 different 

custom instructions (in particular 2 "External Interface Custom 

Instruction") with a variable Multi-Cycle. 

 

Each custom instruction has the canonical inputs and oputputs as specified in the custom instruction application note: 

 

INPUT: clk, clk_en, reset, start 

OUTPUT: done, result[31..0] 

 

Currently, these two custom instructions could be implemented with only 

one piece of logic that can serve both instructions. 

 

If I try to implement them with a single piece of logic, I get all the 

input and output pins twice (one for the first custom instruction, one 

for the second). 

 

Are there any relationship between the first custom instruction's pins and 

the second custom instruction's pins inside the ALU???  

 

(For example, I would expect that clk, clk_en, reset, and other pins are simply the same signals routed once for each custom instruction...) 

 

May I simplyfy the hardware I'm writing supposing that some pins arrive 

only once to that unique piece of logic that serve more than one custom 

instruction? 

 

Thank you! 

 

Matteo
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
424 Views

Hi Matteo,  

 

Dont know if it can solve your problem, but you can you custom instruction of type "extended". 

they are still multi-cycle, and also receive a n[1..7] vector as input. Meaning that you can fit your block of logic under only 1 custom instruction extended, but actually parameter your instruction with n[1..7]. 

 

Sylvain
0 Kudos
Reply