Setting the details, Setting the details –4 – Altera Nios II Custom User Manual

Page 34

Advertising
background image

4–4

Chapter 4: Implementing a Nios II Custom Instruction in Qsys

Implementing Custom Instruction Hardware in Qsys

Nios II Custom Instruction User Guide

January 2011

Altera Corporation

1

If the interface includes a

done

signal and a

clk

signal, the component

editor automatically infers that the interface is a variable multicycle type
custom instruction interface, and sets the value to

0

.

6. For Clock Cycle Type, type

Variable

for a variable multicycle type custom

instruction,

Multicycle

for a fixed multicycle type custom instruction, or

Combinatorial

for a combinational type custom instruction. Because the design

example builds a variable multicycle type custom instruction, Clock Cycle Type is
set to Variable.

1

If the interface does not include a

clk

signal, the component editor

automatically infers that the interface is a combinational type interface. If
the interface includes a

clk

signal, the component editor automatically

infers that the interface is a multicycle interface. If the interface does not
include a

done

signal, the component editor infers that the interface is a

fixed multicycle type interface. If the interface includes a

done

signal, the

component editor infers that the interface is a variable multicycle type
interface.

7. For Operands, type the number of operands for your custom instruction. For the

design example, type

1

.

If your custom instruction logic requires additional interfaces, either to the
Avalon-MM fabric or outside the Qsys system, you can specify the additional
interfaces in the Interfaces tab. The design example does not require additional
interfaces.

1

Most custom instructions use some combination of standard custom instruction ports,
such as

dataa

,

datab

, and

result

, and do not require additional interfaces.

The following instructions provide the information you need if a custom instruction
in your own design requires additional interfaces. If you are walking through the
design example, proceed to

“Setting the Details”

.

To specify additional interfaces on the Interfaces tab, follow these steps:

1. Click Add Interface. The new interface has Custom Instruction Slave interface

type by default.

2. For Type, select the desired interface type.

3. Set the parameters for the newly created interface according to your system

requirements.

Setting the Details

To specify the final details in the custom instruction parameter editor, follow these
steps:

1. Click Next to display the HDL Parameters tab.

2. Click Next to display the Library Info tab.

3. For Name and for Display Name, type

CRC

.

4. For Version, type

1.0

.

Advertising