Real Hardware Reference Design Projects 


SA1200 Beta Release 7/30/99

With this release, the 12 and 16 port workbench projects can be run on the SA1200 validation board.
In addition, it is possible to run each on simulator or hardware, by changing workbench settings
as described below. 
The following is a description of the projects and how to run them on SA1200 hardware.

Prerequisite:
Install Windriver Tornado 1.01
Setup the SA1200 Validaton Module Development environment as described in Validation System Users Guide.
Set Tornado default directory to \dev_1200\vxworks_lib\debug. This can be done by opening any file
in that directory.

Run Instructions. (to compile core code and run):
-----------------------------
1. go to the build directory and make the core libraries object file
	cd  dev_1200\sa1_corelibs\sa1200core_build
	make -f vxworks_rtm.mak NetApp_DBG

(this will produce a \dev_1200\vxworks_lib\debug\VxWorks_RTM.o). This contains drivers and libraries
code that will run on the SA1200 ARM core.

2. connect fast ethernet from packet source (e.g. smart bits). If using SmartBits, a sample set of
packets for basic testing is at dev_1200\Microcode\workbench_projects\refdes.vts. This will source
packets on 16 100M ports, that have IP destination addresses that match those that are loaded into
the Route Table by the NetWork Application.

3. power up the SA1200 validation module.

4. you vxworks HyperTerminal on COM1 should display the boot messages:
...
Attached TCP/IP interface to dc0.
...
Early serial debug initialized
...
                 VxWorks

Copyright 1984-1998  Wind River Systems, Inc.

            CPU: Intel vbsa1200 - ARMSA1200
        VxWorks: 5.3.1
    BSP version: 1.0/2
  Creation date: Jul 24 1999
            WDB: Ready.

4. launch target server from Tornado
tools->TargetServer->configure->launch

5. launch shell <ip_addr>@<hostname>
->i


6. show directory
ls

 Directory of *:\dev_1200\vxworks_lib\debug
 ...		VxWorks_RTM.o

if you are not in the right directory,
cd "\dev_1200\vxworks_lib\debug"

7. load the network application and drivers

ld < VxWorks_RTM.o

8. initialize the drivers and libraries. This also calls WbSvr_init that will setup the SA1200 side
of the workbench RPC connection.

NetApp_Init

9. from the shell you can call many of the library functions:

lkup "Oct"
(will display all Octal MAC driver functions)
useful ones are 
	OctalMAC_NetStat portnum, macnum
		(this displays the octal mac port receive and transmit counters)
	OctalMAC_CtrlReg portnum, mac num
		(this displays the control registers)

where portnum is 0-7
macnum is 0-1

lkup "NetApp"
(will display the Network Application functions. The source for these are in 
\dev_1200\sa1_corelibs\app_1200)

10. open the workbench project, such as refdes12hw or refdes16hw

11. build microcode
build->rebuild

12. start debugging. This will load microcode to the SA1200.
The traffic light will then go green, meaning microengines are paused.
If you want the ports to not pause every time you pause microengines, goto
debug->hardware options->port and uncheck them. This is useful for stepping
through small packets that fit in the MAC fifo (<= 256 bytes).

13. run. press the green light. It will turn red, indicating the microengines are running.

14. send packets from the packet source. check you MAC counters.

You can pause by pressing the red light. 
At this time you can set breakpoints, etc. then resume.



project refdes12hw
------------------
This has same microcode source code as project pfwd12
This project is setup for
	hardware mode
	microcode assembled as LITTLE_ENDIAN
	packet buffer count = 300

It is set up to run in hardware mode. Follow the Run Instructions above.

To run this in simulation mode:

debug->simulation
debug->start debugging
at command line
goto freelist_created#
run_receives(10);
	


project refdes16hw
------------------
This has same microcode source code as project pfwd16
This project is setup for
	hardware mode
	microcode assembled as LITTLE_ENDIAN
	packet buffer count = 300


It is set up to run in hardware mode. Follow the Run Instructions above.

To run this in simulation mode:

debug->simulation
debug->start debugging
goto freelist_created#
run_receives(10);


project pfwd12
--------------
This has same microcode source code as project refdes12hw
This project is setup for
	simulator mode
	microcode assembled as BIG_ENDIAN
	packet buffer count = default(100)

This is setup to run in simulation mode.

To run this in hardware mode, follow the Run Instructions above, except that after
NetApp_Init, do

NetApp_BigEndian

(this sets MAC devices 0 and 1 to big-endian)

Then continue with Run Instructions


project pfwd16
--------------
This has same microcode source code as project refdes16hw
This project is setup for
	simulator mode
	microcode assembled as BIG_ENDIAN
	packet buffer count = default(100)

This is setup to run in simulation mode.

To run this in hardware mode, follow the Run Instructions above, except that after
NetApp_Init, do

NetApp_BigEndian

(this sets FBI,  MAC devices 0 and 1 to big-endian)

Then continue with Run Instructions

