INTRODUCTION

Introduction

The Ethernet Physical Interface Models provide access to the local network from the simulated schematic.

The simulated network controller works through any existing Ethernet network card connected to the local network.

There are currently two models of Ethernet cards available: Realtec RTL8019AS and Microchip ENC28J60.

See also

Network Card Setup

Installing WinPcap

Controller Models

Debugging Messages

This help file last modified 16th May 2010.


CONTROLLER MODELS

Microchip ENC28J60 Ethernet Controller model

The following features of the ENC28J10 are currently modelled:

  • SPI Interface;
  • 8 KB internal RAM;
  • Common, MAC, MII and PHY registers;
  • Packets sending and receiving;
  • DMA operations (calculate checksum, copy memory);
  • Received packets filtering (Unicast, Multicast, Broadcast, Magic Packet™, Pattern Match, Hash Table, Checksum);
  • Power-Down Mode;
  • LEDs output;
  • Interrupt logic;
  • Rset logic.

Limitations:

  • The Built-in Self-Test Controller is not modelled.

Please refer to the ENC28J60 controller datasheet to the full list of features.

This model has been tested using Microchip TCP/IP stack on the virtual Explorer 16 board + PICtail Plus daughter board. These schematics are provided as sample designs in the ‘

..\Samples’ directory of your Proteus installation.

Realtec RTL8019AS Ethernet Controller Model

The following features of the RTL8019AS are currently modelled:

  • Parallel ISA-compatible interface (20 bit address bus, 16 bit data bus, 8 bit control bus);
  • 16 KB internal RAM;
  • NE2000 compatible registers;
  • RTL8019AS specific registers;
  • Packets sending and receiving;
  • Received packets filtering;
  • Sleep and Power-Down Mode;
  • LEDs output;
  • Interrupt logic;
  • Reset logic.

Limitations:

  • Plug and Play not implemented;
  • · Boot PROM not implemented;
  • · External 9346 serial EEPROM not implemented.

Please refer to the RTL8019AS controller datasheet to the full list of features of this chip.

This model was tested with Microchip TCP/IP Stack on the virtual PICDEM.NET board. This schematic is provided as sample designs in the ‘..\Samples’ directory of your Proteus installation.

Both these controllers’ models also include advanced diagnostic messaging. For more information on enabling and configuring diagnostic messaging please refer to the section entitled Diagnostic Tools & Trace Modes (under Working with Microprocessors) in the Proteus VSM Help document. This document can be launched from the Help Menu in ISIS at any time.


DEBUGGING MESSAGES

These models provide comprehensive debug messages. There are several types of diagnostic messages that may be displayed according to both the selected trace category and the selected severity for that category. By default, all trace categories are set to be ‘Warnings Only’ – a full listing of diagnostic messaging options is provided below.

General Diagnostics

Option | Description
Warnings Only | Enables WinPcap error diagnostic messaging.
Full Trace | Also enables reset event diagnostics, link status messages and details interrupts and LED events.

Bus Commands

Option | Description
Full Trace | Enables diagnostic reporting on bus flow commands.

Data Read/Write

Option | Description
Full Trace | Enables diagnostics on read and write operations of the network controller memory.

Commands

Option | Description
Warnings Only | Enables warnings of wrong DMA operations and of incorrect power mode change procedures.
Full Trace | Enables trace diagnostics for DMA operations and power mode change events.

Packet Comms

Option | Description
Warnings Only | Enables warnings for incorrect TCP and IP checksums and packet transmission errors.
Full Trace | Also enables diagnostics containing the MAC addresses for sent and received packets and on dropped.
Debug | Adds diagnostic messages containing the packet contents (severe load on CPU imposed when enabled).

To configure diagnostic messaging:

  1. Make sure that the simulation is stopped completely and then launch the Configure Diagnostics command from the Debug menu.

  2. Expand the network controller item and select the desired trace category.

  3. Use the radio buttons at the bottom to set the severity level for the selected category.
  4. Exit the diagnostics dialogue form and start the simulation.

Note that enabling a lot of diagnostics will impose a considerable load on the simulation as a huge amount of ASCII text is output to the simulation advisor. While this is not a concern when debugging it is best to turn on diagnostics selectively and only when appropriate to maximise simulation performance in general usage.


INSTALLING WINPCAP

Please download and install latest stable version of "WinPcap auto-installer (driver +DLLs)" libraries from the Internet site http://www.winpcap.org

  1. Click on Get WinPcap from the website menu, and then on the WinPcap Auto Installer. Save the file where desired.

  2. Once saved, close any running applications and double click on WinPcap.exe and follow the installation process.

  3. Click Finish to complete the installation.


Network Card Configuration

NETWORK CARD SETUP

To disable hardware checksum generation:

  1. Go to the ‘Control Panel’ for the computer and select System.

  2. Navigate to Hardware and select Device Manager.

  3. Find and expand Network Adapters, right click and select Properties.

  4. Select Advanced and then Checksum Offloading or Tx Task Offload or Hardware Checksumming (this name depends on the network driver. Change the value to be disabled.

  5. Select OK to confirm and exit.


NETWORK CARD SETUP

The NICS model will not work unless your computer has a physical Ethernet card. Check that you have such a card and that any drivers for it are both installed and enabled.

When working from one machine only, it is necessary to disable "Checksum Offloading" or "Hardware Checksumming" (the name depends on the network driver) in the properties of the physical network card in order to allow communication with the virtual network card. There is no need to disable this setting if communication with the simulated network card is provided via a different computer on the network. A simple guide to this procedure is provided here.

You can use VMWare Virtual Network Adapters if you don’t have Ethernet network or if you don't

t want to debug your application in the real network. It is suitable for debugging TCP/IP application, because there are almost no any outside TCP/IP packets. An installation instructions of VMWare products is provided here.

If there are several network card installed in the computer, you must set the number of the card in the model properties of the network controller schematic part. The network card number can be obtained by using the "iflist.exe" program as follows:

1. From the Start Menu in Windows select the Run command.

2. Enter "c:\Program Files\Labcenter Electronics\Proteus 7 Professional\BIN\iflist.exe". You will then see something like the following:

0: \Device\NPF_GenericDialupAdapter

Description: Adapter for generic dialup and VPN capture

Loopback: no

1: \Device\NPF_{308AEC7C-5861-4F59-A1E1-3C9D045CAA9C}

Description: VMware Virtual Ethernet Adapter

Loopback: no

Address Family: #2

Address Family Name: AF_INET

Address: 192.168.220.1

Netmask: 255.255.255.0

Broadcast Address: 255.255.255.255

2: \Device\NPF_{59955D19-1BF5-474E-B90C-B2492CA7936E}

Description: Marvell Gigabit Ethernet Controller

Loopback: no

Address Family: #2

Address Family Name: AF_INET

Address: 10.0.0.65

Netmask: 255.255.255.0

Broadcast Address: 255.255.255.255

3: \Device\NPF_{A6133567-A839-42CE-A03A-979721CC47BD}

Description: VMware Virtual Ethernet Adapter

Loopback: no

Address Family: #2

Address Family Name: AF_INET

Address: 192.168.80.1

Netmask: 255.255.255.0

Broadcast Address: 255.255.255.255

3. You need to decide to which network card you want to connect. Then, look at the number of the card on the left of the listing. For example, we wish to connect to VMware Virtual Ethernet Adapter having address 192.168.220.1. Its number is 1.

4. Edit the schematic part in ISIS, and enter this number in the "Network Card No" field:

5. Press OK, save design and start the simulation process. If you are running one of the pre-supplied sample designs make sure that you have a working DHCP server on the network.

6. Please do not use "Adapter for Generic Dialup and VPN capture" because it is not compatible with simulated Ethernet controllers’ models.


USING VMWARE WITH MODELS

It is possible to work with models using the virtual Ethernet adapter like one in the VMWare Workstation, Player or Server.

To install the free VMWare Workstation:

  1. Open the Internet web page http://www.vmware.com/download/player/ and press Download link for the latest VMWare Player version.
  2. Fill the required form and accept the user license agreement.
  3. Press Download link to download the VMWare Player for Windows.
  4. Press Save button and select location to save this file:

  5. After downloading start it, and go through all the installation steps:

  6. Restart the computer in order to let WinPcap see newly installed VMWare Virtual Network Adapters.

  7. You can use any of VMWare Virtual Network Adapters for work if they are configured by default. Please refer to Network Card Setup.