1 *************************************************************************
2 * CPSW Single Core Example
3 * ---------------------------------
4 *
5 * (C) Copyright 2009-2013, Texas Instruments, Inc.
6 *
7 * Use of this software is controlled by the terms and conditions found
8 * in the license agreement under which this software has been supplied.
9 *************************************************************************
11 The CPSW (EMAC) Single core example demonstrates the use of CPSW CSL APIs to
12 configure the ethernet switch on target (silicon and simulator). It further demonstrates
13 the use of CPPI/QMSS/PA LLDs to send/receive data through the ethernet switch using
14 Host descriptors on any given DSP core.
16 The example is designed to run in loopback modes, i.e. it expects to receive the transmitted packet.
17 The following two loopback modes are supported:
18 CPSW_LOOPBACK_INTERNAL(default): The transmitted packet is loopbacked at the SGMII through SGMII internal loopback
19 CPSW_LOOPBACK_EXTERNAL: The transmitted packet should bo loopbacked by application outsite the SoC
21 This example also demonstrates the normal CPSW configuration as CPSW_LOOPBACK_NONE mode. In this configuration, it is up to the user
22 to modify PASS configuration to receive desired ingress packets.
24 Check the release notes for prerequisites, version information and steps on how to
25 run examples
27 -------------------------
28 Execute Project
29 -------------------------
31 1. Simulator configuration
33 In order for the example to work in external loopback mode successfully, i.e. to be able to send/receive data packets from the wire,
34 Please refer to http://ap-fpdsp-swapps.dal.design.ti.com/index.php/66AK2H12_Device_Simulator_User_Guide#Configurable_parameters_for_simulation
35 to configure the following EMAC config params in CCSEup
36 a) EMAC Adaptor Enable: ON
37 b) EMAC Network Adaptor: Broadcom (NIC card using in PC)
38 c) EMAC MAC Adress Port 0: other
39 EMAC_MAC_ADDR_PORT0: 10-11-12-13-14-15
41 2. Execute using CCS
43 Launch the CCS Debugger and go to the Debug Perspective.
45 To execute the project ensure the following is done:-
46 a) System reset (applicable for EVM under NO_BOOT mode only)
47 b) Run EVM specific GEL scripts (applicable for EVM under NO_BOOT mode only)
48 b) Load Program
49 c) Once the project is loaded; Run to execute it.
51 NOTE:
52 If EVM is *NOT* running in NO_BOOT mode, the below assumptions are made
53 2a. The PDSPs are downloaded for QMSS and PA outside the example
54 2b. CPSW Switch is configured outside the example
55 2c. To disable the auto detect logic, please set 'autodetectLogic' variable to '0' using CCS. When this is done, the all the steps as mentioned in 'Execute' section are mandatory.
57 3. Result
59 The application will output to the console its status progress and the number of sent/received packets
60 and declare pass/fail.
62 4. Loading and Executing the project using MPM Client Utility
63 a) Bring up linux
64 b) copy the DSP executable (e.g., PA_emacExample_K2HC66BiosExampleProject.out) to the filesystemExecute
65 c) Execute below command to reset core0
66 root@keystone-evm:~#mpmcl reset dsp0
67 d) Execute below command to load the DSP image to core 0
68 root@keystone-evm:~#mpmcl load dsp0 PA_emacExample_K2HC66BiosExampleProject.out
69 e) Execute below command to run the DSP image from core 0
70 root@keystone-evm:~#mpmcl run dsp0
71 f) Execute below command to view System_printf() outputs from core0 trace/log message from Linux
72 root@keystone-evm:~#cat /debug/remoteproc/remoteproc0/trace0