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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

custom instruction 'done' signal

Altera_Forum
Honored Contributor II
1,055 Views

I am working with self timed circuits, in which i need to pick the end of a multicycle operation (implemented in custom logic) to initiate further actions. To accomplish this task, i need both result and done signals to be returned from the custom instruction. I will be grateful if i am given to understand 

1. how to receive the done signal into C program.  

2. whether the done signal can be used to initiate further activities. 

3. in an188.pdf, i cannot find the done signal in the multicycle operation list.  

4. i cannot find any sample program that uses multicycle function (using clk, clk_en, start, done, dataa, datab, result). could you please privide me with one or with any other related resource.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
385 Views

Hi, 

 

Add a 1-bit PIO to your system and feed the done signal into it. You can then either poll the bit or make it generate an irq. 

 

Banx.
0 Kudos
Altera_Forum
Honored Contributor II
385 Views

I think the done signal from the custom instruction is only used at processor level. Firing the custom instruction will cause the processor to wait until the done signal is there. You can compare it with inserting waitstates for memory access.  

 

If you need a lot of time in the custom instruction, it is better to move the functionality in a custom avalon slave, and poll the slave every now and then on a certain address to look at the state (or use an interrupt). This way, the processor can go one doing other things.
0 Kudos
Reply