SLIP - Serial Line Internet Protocol

By Steven Dytiuk

The NETCON Group:
Steven Dytiuk, Jones Yu, Mimi Yiu, Randy Tsen, Justin Bague, and Chris Jones


NOTE! This is the only correct version of RS232_In that is available!!!! (as of date this page was posted)

Abstract

Our Network Connected Appliance (NETCON) exists to connect a Local Area Network (LAN) to an appliance, enabling remote control of the appliance.  For example, one can reboot his office computer remotely, should it become unresponsive during a remote session, or turn on an office light, etc.

Two strategies were developed to implement this purpose: SLIP and Ethernet.  This document will cover SLIP. 

Description of Operation

The SLIP component takes in 6 inputs, and produces 8 outputs. The soutclr and reset components are both connected to SlipControl’s reset because they are two separate resets that we don’t need to differentiate against in this project. Serialin is the serial input (using SLIP protocol) we are receiving from the serial port. Sysclock is the FPGA clock at 25.175 MHz. Serialout is the serial output we transmit (using SLIP protocol) based on the serial_out_data input we receive from EnetControl. Outready is a signal which indicates when we are ready to either receive or transmit data. Out_load must be pulsed high when a new word needs to be outputted from serial_out_data.

The SLIP component uses the RS232 transmission files, originally obtained from an Appnote by the DPF Group. It converts the serial input to byte-sized words, keeps track of the address that the word should be stored in SLIP_BUFFER, and when the END character is received, pulses pktRead high. Each word is stored into SLIP_BUFFER as soon as it is completely received. To send, the SLIP component translates the serial_out_data into serial data conforming to the SLIP standard, and sends it out over the serialout line.

The SLIPBUFFER component utilizes on-board RAM to store and retrieve the data sent to us over the serial connection. Whenever the SLIP component has something to write to SLIPBUFFER, write is put high, and SLIPBUFFER will store the data into the address indicated by ADDRESS. Whenever write is low, SLIPBUFFER will send the data from the address specified by ctrl_address_in out to the ENETCONTROL.

The SLIP protocol has four special characters:

The END character is used to indicate the end of an arbitrary sized packed. The ESC character is used so that we can transmit the same data as the END character without conveying the END message.  For example, if the data we want to transmit happens to be 0b11000000, we will instead send ESC followed by ESC_END so that the receiver will receive the data we want to send but will not think that the packet is complete.

Block Diagram of Slip Control

Code

Code Hierarchy:

To use the Slipcontrol component, you will need all of the *.vhd files which are provided below:

* These files were copied - refer to References Item #1

** The RS232_In.vhd file was originally taken from * but was found to be incorrectly implemented. It required TWO stop bits rather than one, as per the standard. The version we implemented correctly conforms to the one stop bit standard.

To see the SLIP work in action, use the sliptester.vhd file. All you have to do is make your pin assignments. Use one button for reset and one button for nextpacket. Hook up the RS232 connection appropriately, and send it some data. Make sure you send the end character to mark the end of a packet. You can now press the nextpacket button to see what was stored in each address of ram. The pin "lightaddress" should be connected to an LED on the FPGA: when the LED is on, the display is showing the address; when the LED is off, the display is showing the data stored at that address.

Click here for a detailed schematic on how to set up the RS232 Connection! Click here for a diagram of the RS232 Cable Connector Map.

References

These references were used as a source of code and/or ideas for the implementation of this design:

  1. Winter 2002 App Note and VHDL files modified by Dave Ng, Mel Lumague, Ben Talbot, Emy Egbogah, and Nitin Parimi, viewed March 24, 2002.
  2. Thornton, Mitch. “Lab4: Using LPMs in VHDL.” Viewed March 24, 2002.
  3. Romkey, J. "RFC 1055." Viewed March 24, 2002.
  4. MAXIM +5V-Powered, Multichannel RS-232 Drivers/Receivers. Viewed April 5, 2002.

Page created on March 27, 2002 by Steven Dytiuk. Last updated on April 14, 2002.

The NETCON Group:
Steven Dytiuk, Jones Yu, Mimi Yiu, Randy Tsen, Justin Bague, and Chris Jones