Multiple Devkit Feature

Overview

This feature allows multiple devkits (CAT-DEV) to be connected to, and controlled from, a single host PC without using virtual machines (VMs).

Using the Multiple DevKit Feature

Opening A Session

To open a multi-devkit session, open a Windows CMD shell and run cafe.bat -multi. This batch file will establish the multi-devkit environment variables necessary to run the session.

To make use of a multi-devkit session, the session environment must be initialized by setting the name and IP of the devkit it will make use of. This can be performed using either one of the following methods.

Using cafeon

By default cafeon will sync the data directory and will overwrite any settings previously saved in the System Config Tool. To prevent these settings from being overwritten, use the -nosync option. If cafeon is the first command used in the session window, then the -nosync option cannot be used and will exit with the appropriate error message.

Usage: cafeon -nosync

Using caferun

By default caferun will sync the data directory and will remove any files that were created by the running title. To prevent the data directory from being synced, use the -z option. If caferun is the first command used in the session window then the -z option cannot be used and will exit with the appropriate error message.

Usage: caferun -z -b $CAFE_ROOT/system/bin/ghs/cafe/demo/helloworld/DEBUG/helloworld.rpx

Session Syncing

In multi-devkit SDK operations, the session data directory is synchronized during caferun or cafex before the title is launched. Occasionally, this automatic synchronization has unwanted side effects. For example: Deleting / updating files with persisted data, settings, etc.

To resolve this problem, perform the following.

  1. Run a manual sync using the syncsession utility.
  2. Use the -z option in caferun and the -nosynch option in cafeon to disable automatic synchronization.

The syncsession utility calls synctool to perform the work of syncing the data directories.

NOTE:
If CAFE_SAVE_DIR is changed from the default value, it will no longer be synced when running from a multi-devkit window.

Cleaning Up a Session

Cleaning a session is generally not needed. If you would like to remove all of the temporary folders and files that were created during running of your code, see cleansession.

Environment Variables

Each session has the following environment variables that contain session specific information. Developers should not change the value of any of these variables as there may be unpredictable side effects.

Environment Variable Description
SESSION_MANAGER Set to 1 when the multi-devkit feature is active. Can be set to 0 or not defined when multi-devkit is not active.
SESSION_NAME Name of the session. This is based on the IP address of the devkit
SESSION_PATH_PREFIX Prefix to be added to the start of session specific path and file names. Empty in a non multi-devkit window.
SESSION_DEBUG_OUT_PORT Session TCP port number for debug output. The default is 6001.
SESSION_DEBUG_CONTROL_PORT Session TCP port number for debugger connectivity and control. The default is 6002.
SESSION_HIO_OUT_PORT Session TCP port number for Host IO. The default is 6003.
SESSION_LAUNCH_CTRL_PORT Session TCP port for soft-launch control. The default is 6006.
SESSION_PCFS_SATA_PORT Session TCP port for PCFS over SATA transport. The default is 7974.
CAFE_DATA_DIR Session specific data directory. This is synced from $CAFE_ROOT/data
CAFE_DATA_TMP Session specific code directory where code is ran from. This is sync's from the CODE/ELF directory.

Capacity

At this time, it is recommended that no more than 16 Devkits be used with one PC. The recommendation is based on tests using the host PC specified below. Your results may vary depending on your PC and network environment.

Environment

Host PC

Make/ModelDell Precision T3500.
Operating SystemWindows 7 (64-bit) with SP1.
ProcessorIntel Xeon Quad Core @ 2.72GHz.
Memory12 GB RAM.
Disk1TB, 7200RPM Internal Hard Drive.
NetworkBroadcom NetXtreme Gigabit Controller.

Network

Three different Networks were used that were connected by several gigabit switches.

DevKits

16 CAT-DEVs were used.

Testing

A test was conducted using a dedicated PCFS stress test that performs random reads and writes using file sizes from 2B-1MB in size, and sustained for 1 hour.

Below is a table and screenshots of the results.

CPU31-50%
DiskWrite: 4.1Mb/S, Read: Unavailable due to disk caching.
Network43%

CPU Utilization Screen Snapshot:
CPU Utilization Screen Snapshot

Network Utilization Screen Snapshot:
Network Utilization Screen Snapshot

Limitations

Building the SDK

The SDK cannot be built using a multi-devkit window. This is because the main OS image is rebuilt and will be located in $CAFE_ROOT/data. If an attempt is made to build the SDK, the following error will be produced:

build/make/multi_session_check.mk:16: Cannot build when multi session is enabled!
build/make/multi_session_check.mk:17: *** Please open a non multi-session window and build again.  Stop.

You will need to open a non multi-devkit window using cafe.bat to build the SDK making sure that any open Cafe windows are not running any code.

No Cafe window (multi-devkit or not) can be running any code while building the SDK for a particular enlistment. Session specific data files are linked to the those being built in $CAFE_ROOT/data and may be locked or have their contents changed while devkits are running. Running make clobber in any SDK source directory ($CAFE_ROOT/system/src) calls cafestop and since this has to be ran in a non multi-devkit window, all running devkits are stopped, regardless of the enlistment they are running in.

Using with Non Multi-Devkit Windows

Caution must be used when using non multi-devkit windows with this feature. If any commands which interact with the devkit, such as uploading.sh, caferun, and cafestop are used in the non multi-devkit window, it will affect all devkits running. Even those in multi-devkit windows. Individual devkits are isolated only between multi-devkit windows. Non multi-devkit windows do not have this isolation and may apply commands to more than one devkit. Improper use may lead to unpredictable results.

Host I/O Applications

Any existing desktop applications using the default HIO output port of 6003, will need to change its port number.

Use the session specific environment variable SESSION_HIO_OUT_PORT to obtain the HIO port value for the session if not using 6003.

Revision History

2014/09/23 Removed Caution and removed cleansession to independent page.
2014/02/19 Replace refs to multi_cafe.bat.
2014/02/06 Removed references to MP1 and MP2.
2013/12/23 Added image links to full screen views.
2013/07/29 Updated the Session syncing section.
2013/05/08 Automated cleanup pass.
2013/04/05 Added Session Syncing section.
2013/03/13 Editorial updates.
2013/01/23 Updates for System Config Tool.
2012/09/12 Updated for initial release.
2012/07/26 Initial version.


CONFIDENTIAL