ENT-UG1060 User Guide Software API Programming
Total Page:16
File Type:pdf, Size:1020Kb
ENT-UG1060 User Guide Software API Programming Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for communications, defense & security, aerospace and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world's standard for time; voice processing devices; RF solutions; discrete components; security technologies and scalable anti-tamper products; Ethernet solutions; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services. Microsemi is headquartered in Aliso Viejo, Calif, and has approximately 3,600 employees globally. Learn more at www.microsemi.com. Microsemi Corporate Headquarters Microsemi makes no warranty, representation, or guarantee regarding the information contained herein or One Enterprise, Aliso Viejo, the suitability of its products and services for any particular purpose, nor does Microsemi assume any CA 92656 USA liability whatsoever arising out of the application or use of any product or circuit. The products sold hereunder and any other products sold by Microsemi have been subject to limited testing and should not Within the USA: +1 (800) 713-4113 be used in conjunction with mission-critical equipment or applications. Any performance specifications are Outside the USA: +1 (949) 380-6100 believed to be reliable but are not verified, and Buyer must conduct and complete all performance and Sales: +1 (949) 380-6136 other testing of the products, alone and together with, or installed in, any end-products. Buyer shall not rely Fax: +1 (949) 215-4996 on any data and performance specifications or parameters provided by Microsemi. It is the Buyer's E-mail: [email protected] responsibility to independently determine suitability of any products and to test and verify the same. The © 2015 Microsemi Corporation. All information provided by Microsemi hereunder is provided “as is, where is” and with all faults, and the entire rights reserved. Microsemi and the risk associated with such information is entirely with the Buyer. Microsemi does not grant, explicitly or Microsemi logo are trademarks of implicitly, to any party any patent rights, licenses, or any other IP rights, whether with regard to such Microsemi Corporation. All other information itself or anything described by such information. Information provided in this document is trademarks and service marks are the proprietary to Microsemi, and Microsemi reserves the right to make any changes to the information in this property of their respective owners. document or to any products and services at any time without notice. VPPD-03999. 1.1 10/15 Contents 1 Revision History . 1 1.1 Revision 1.1 . 1 1.2 Revision 1.0 . 1 2 Product Overview . 2 2.1 API Architecture . 2 2.2 Basic API Functions . 3 2.3 Advanced API Functions . 3 2.4 Key API Specifications . 3 2.5 Header File Comments (API Calls and Parameters) . 3 3 System Overview and Design . 4 3.1 CPU . 5 3.1.1 Internal CPU . 5 3.1.2 External CPU . 6 3.2 Register Access using PCIe . 6 3.3 Register Access using Serial Protocols (SPI) . 7 3.4 Register Access using Ethernet . 7 3.5 Packet Insertion and Extraction . 7 3.6 Management Channels . 8 3.7 Precision Timing . 8 4 API and Device Configuration . 9 4.1 System and Device Configurations . 9 4.1.1 API Configurations . 10 4.2 Targets . 10 4.2.1 Build Flow and Configuration Constants . 10 4.2.2 API Options . 11 4.2.3 Application Options . 11 4.2.4 Code Structure . 14 4.2.5 Applications using Software Development Kits (SDK) and eCos . 14 4.3 Linux Applications . 14 4.3.1 Test Application vtss_miniapp . 14 4.3.2 Build a Linux Application . 14 5 Applications and API Usage Examples . 20 5.1 Switch Application Functionality . 20 5.1.1 Platforms . 20 5.1.2 The vtss_miniapp Switch Application Functionality . 20 5.1.3 Setup and Initialization . 20 5.2 Switch API Demo eCOS Example . 23 5.3 EVC Setup . 26 5.4 PHY Application Functionality . 30 5.4.1 PHY Application Example . 30 5.5 OTN Mapper Application Functionality . 31 5.5.1 Port and Channel Numbering . 31 5.5.2 Register Access . 32 ENT-UG1060 User Guide Revision 1.1 iii 6 API Usage . 33 6.1 Directory Structure . 33 6.2 Common Data Structures . 33 6.2.1 Initialization . 33 6.2.2 Instance References . 34 7 Guidelines for Applications . 35 7.1 High-Level Design Recommendations . 35 7.2 Recommended API Calling Sequence . 35 7.3 Checklist for API Configuration . 35 8 Device Families . ..