Main Content

addEthernetMACInterface

Class: hdlcoder.Board
Namespace: hdlcoder

Define Ethernet MAC interface for board object

Since R2022b

Syntax

addEthernetMACInterface('InterfaceType',interfacetype,'MACAddress',macaddress,'IPAddress',ipaddress,'NumChannels',channels,'PortAddresses',portaddresses,'EthernetMACConstraintFile',constraintfile)

Description

addEthernetMACInterface('InterfaceType',interfacetype,'MACAddress',macaddress,'IPAddress',ipaddress,'NumChannels',channels,'PortAddresses',portaddresses,'EthernetMACConstraintFile',constraintfile) adds an Ethernet media access controller (MAC) Hub intellectual property (IP) to an hdlcoder.Board object.

Use this function if your board has the Ethernet physical layer (PHY) and you want to use the Ethernet option for the Insert AXI Manager (HDL Verifier required) and FPGA Data Capture (HDL Verifier required) reference design parameters in the Set Target Reference Design task of the HDL Workflow Advisor.

Note

  • AXI manager and FPGA data capture in the HDL Workflow Advisor support programmable logic (PL) Ethernet only. The processing system (PS) Ethernet is not supported.

  • FPGA data capture in the HDL Workflow Advisor does not support SGMII interface.

Input Arguments

expand all

Type of Ethernet interface for the target board, specified as 'GMII', 'MII', or 'SGMII' according to the interface of your target board.

Example: 'GMII'

Data Types: char

MAC address of the target board, specified as a character vector containing a six-octet hexadecimal value. The MAC address is the physical address of the target board.

Example: '0x000A3502218A'

Data Types: char

Internet protocol (IP) address of the Ethernet port on the target board, specified as a character vector containing a dotted-quad value. The target IP address must be a set of four integers in the range [0, 255] that are separated by three dots.

Example: '192.168.0.2'

Data Types: char

Number of AXI-stream channels in the Ethernet MAC Hub IP, specified as an integer in the range [1, 8].

Example: 2

Data Types: uint8

User datagram protocol (UDP) port numbers for each AXI-stream channel in the Ethernet MAC Hub IP, specified as a row vector of integers in the range [255, 65535].

Example: [50101 50102]

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Ethernet MAC constraint file path for the target board, specified as a character vector containing the path of the constraint file relative to the path of the reference design.

Example: '../kc705_ethernet_gmii.xdc'

Data Types: char

Examples

expand all

Define an Ethernet MAC interface for an hdlcoder.Board object that you create for the Xilinx® Kintex®-7 KC705 development board.

Create an hdlcoder.Board object for the Kintex-7 KC705 board.

hB = hdlcoder.Board;
hB.BoardName = 'Xilinx Kintex-7 KC705 development board';

Define an Ethernet MAC interface for the created board object.

hB.addEthernetMACInterface( ...
        'InterfaceType','GMII', ...
        'MACAddress','0x000A3502218A', ...
        'IPAddress','192.168.0.2', ...
        'NumChannels',2,...
        'PortAddresses',[50101 50102], ...
        'EthernetMACConstraintFile','../kc705_ethernet_gmii.xdc');

Tips

  • For details about the Ethernet interface type, MAC and IP addresses, number of AXI-stream channels in the Ethernet MAC Hub IP and their UDP port numbers, and constraints for your board, view the board documentation.

Version History

Introduced in R2022b