The purpose of this practical is to develop a larger application using the Microblaze and the Ethernet. You will need to refer to this page for a description of how to access the Ethernet to send and receive packets.
The application you will develop is an Ethernet-based text chat program. You should be able to use the UART to send messages to other students and to read any messages sent to you.

Each student is assigned a unique MAC address and your solution should set its MAC address accordingly. Try not to accidentally MAC-spoof your fellow students! MAC addresses are found in the table below.
Target
MAC Address
Example solution
00:11:22:33:00:00
ddjb500
00:11:22:33:00:01
jjb513
00:11:22:33:00:02
mb798
00:11:22:33:00:03
dc671
00:11:22:33:00:04
lc758
00:11:22:33:00:05
mc685
00:11:22:33:00:06
jbc504
00:11:22:33:00:07
tod502
00:11:22:33:00:08
re588
00:11:22:33:00:09
af590
00:11:22:33:00:0A
af582
00:11:22:33:00:0B
ajf518
00:11:22:33:00:0C
pg591
00:11:22:33:00:0D
pg562
00:11:22:33:00:0E
di508
00:11:22:33:00:0F
rhwm501
00:11:22:33:00:10
mbm503
00:11:22:33:00:11
lm638
00:11:22:33:00:12
cr640
00:11:22:33:00:13
ms882
00:11:22:33:00:14
dt620
00:11:22:33:00:15
lt696
00:11:22:33:00:16
ptn500
00:11:22:33:00:17
rt615
00:11:22:33:00:18
mbw500
00:11:22:33:00:19
An interaction with your application will look like this:
  • The user enters the last two hex digits of the target MAC address and presses Enter.
  • The user types a message and presses Enter.
  • The application sends the message to the specified target. The message appears on the UART output of the target board.

The format of the Ethernet frames is as follows:
Field
Size in bytes
Destination MAC address
6
Source MAC address
6
Type field = 0x55AA
2
Length of message
2
Message contents
Variable

All numbers are big endian, so 672,957 is 0x000A44BD.

Your solution should use interrupts to receive packets and wait for UART input rather than repeatedly polling. Ethernet networks are noisy, and many packets that are not related to EMBS may be observed. Solutions should check the type field is 0x55AA and disregard any other packets.

There will be a test solution on the network which sends a broadcast message every few seconds and replies to messages when it is sent a message. You can use this to test your solution if no other students are available. Its MAC address can be seen in the table.

Extension

Extend your solution so that broadcast messages are not immediately printed. They are stored in a buffer and the user can 'check their messages' by pressing one of the buttons on the board. This empties the buffer and displays all received broadcast messages in order. Your solution should buffer at least 3 messages.