Please enable JavaScript to view this site.

Waijung 2 User Guide

Design overview

Ethernet setup block appearance in a Simulink model,

zynq_7000_ethernet_setup_block_1

Ethernet setup block mask overview,

DHCP Disabled

zynq_7000_ethernet_setup_block_2

DHCP Enabled

zynq_7000_ethernet_setup_block_3

Ethernet setup block behavior

Ethernet setup block uses the Lwip211 library to perform the Ethernet communication. Ethernet pins are configured using ether MIO or EMIO pins. This should be configured using Vivado Design Suite in the design stage. This block supports both DHCP enabled and disabled modes.

 

The C code related to the Ethernet setup block will be generated and placed in the Waijung 2 initialization function such that it will execute only once. It cannot be configured on the fly.

 

Ethernet modules can be enabled/disabled and changed the pin assignment using the ZYNQ7 Processing System IP in Vivado Design Suite.

Ethernet setup block configuration

Configuration Parameter

Selectable Option/Value

Default Value

Description

DEVICE ID

XPAR_PS7_ETHERNET_0_DEVICE_ID

XPAR_PS7_ETHERNET_1_DEVICE_ID

Depends on the Hardware design. If both Ethernet modules are enabled, by default XPAR_PS7_ETHERNET_0_DEVICE_ID is selected.

Depending on the peripheral availability in your hardware design created using the Vivado Design Suite, available device-ids will be shown.

IP address

 

[192 168 1 10]

IP address of the target hardware. IP address cannot be configured if DHCP is enabled. IP address should be defined as a vector with size of 4.

Net mask

 

[255 255 255 0]

Net mask of the target hardware. Net mask cannot be configured if DHCP is enabled. Net mask should be defined as a vector with size of 4.

Gateway

 

[192 168 1 1]

Gateway address of the target hardware. Gateway cannot be configured if DHCP is enabled. Gateway should be defined as a vector with size of 4.

MAC address

 

00-0a-35-00-01-02

MAC address of the target hardware

DHCP

On

Off

Off

Enable/Disable the DHCP mode.

 

Ethernet setup block limitation

Only PS Ethernet modules are supported in the current Ethernet setup block design.

This block can be used in PIL or External mode in TCP/IP and if the Ethernet module which is used in PIL/External mode is same as in the Ethernet setup block, the ip, netmask, gateway and MAC address should be configured through the Host-board connection tab in the Waijung 2 Target Setup block and the DHCP will be disabled in this scenario.

Typical application

[<waijung2 installation directory>\waijung2\targets\zynq7000\demo\socket_demo]

To load the model file run the following commands in the Matlab Command Window:

• Demo: waijung2.openDemoInCurrentFolder('zynq7000', 'socket_demo')

 

Copyright 2024 Aimagin Co.,Ltd. Rev.1659