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

Page 26

Advertising
background image

3–4

Chapter 3: Implementing a Nios II Custom Instruction in SOPC Builder

Implementing Custom Instruction Hardware in SOPC Builder

Nios II Custom Instruction User Guide

January 2011

Altera Corporation

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.

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

design example, type

1

.

7. If the warning message Interface has no signals appears, click Remove Interfaces

With No Signals

.

If your custom instruction logic requires additional interfaces, either to the
Avalon-MM fabric or outside the SOPC Builder 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

.

5. Leave the Group field blank.

6. Optionally, set the Description, Created by, and Icon fields as you prefer.

7. If the bottom pane of the dialog box displays something other than the message

Info: No errors or warnings

, review the other tabs to ensure you followed the

instructions correctly.

Advertising