SpaceWire. Design of the SystemC model of the SpaceWire-b CODEC. Dr. Nikos Mouratidis

Similar documents
Implimentation of SpaceWire Standard in SpaceWire CODEC using VHDL

SpaceWire 101. Webex Seminar. February 15th, 2006

Page 1 SPACEWIRE SEMINAR 4/5 NOVEMBER 2003 JF COLDEFY / C HONVAULT

Hardware Design and Simulation for Verification

The SpaceWire CODEC International SpaceWire Seminar (ISWS 2003) 4-5 November 2003, ESTEC Noordwijk, The Netherlands

Reducing SpaceWire Time-code Jitter

Modular SystemC. In-house Training Options. For further information contact your local Doulos Sales Office.

SD Card Controller IP Specification

Intellectual Property Macrocell for. SpaceWire Interface. Compliant with AMBA-APB Bus

SystemC Synthesis Standard: Which Topics for Next Round? Frederic Doucet Qualcomm Atheros, Inc

Simulation-Based FlexRay TM Conformance Testing an OVM success story

SpaceWire-RT. SpaceWire-RT Status SpaceWire-RT IP Core ASIC Feasibility SpaceWire-RT Copper Line Transceivers

Design and Verification of FPGA and ASIC Applications Graham Reith MathWorks

SpaceWire Link Interface RTL Verification

PCIe Verification in a SystemC environment using the Cadence VIP

Proposed Technical Solution for Half Duplex SpW

Augmenting a C++/PLI/VCS Based Verification Environment with SystemC

6 Month Certificate Program in VLSI Design & Verification" with Industry Level Projects. Tevatron Technologies Prívate Limited

Efficient use of Virtual Prototypes in HW/SW Development and Verification

The TLM-2.0 Standard. John Aynsley, Doulos

Overview. Design flow. Principles of logic synthesis. Logic Synthesis with the common tools. Conclusions

Ultra-Fast NoC Emulation on a Single FPGA

SpaceFibre Port IP Core

SpaceWire ECSS-E50-12A International SpaceWire Seminar (ISWS 2003)

INDUSTRIAL TRAINING: 6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

UVM in System C based verification

Each I2C master has 8-deep transmit and receive FIFOs for efficient data handling. SPI to Dual I2C Masters. Registers

Agenda. How can we improve productivity? C++ Bit-accurate datatypes and modeling Using C++ for hardware design

Verilog Nonblocking Assignments with Delays - Myths & Mysteries

MAC-PHY Rate Adaptation Baseline. Arthur Marris

Virtual Prototyping in SpaceFibre System-on-Chip Design

System Level Design with IBM PowerPC Models

PG DIPLOMA COURSE IN VERIFICATION USING SYSTEMVERILOG & UVM NEOSCHIP TECHNOLOGIES

List of Code Samples. xiii

BlazePPS (Blaze Packet Processing System) CSEE W4840 Project Design

QEMU and SystemC. Màrius Màrius Montón

Algorithmic C synthesis (High-level synthesis)

GAISLER. SpaceWire CODEC with RMAP GRSPW / GRSPW-FT CompanionCore Data Sheet

Hardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University

Subject: Scheduling Region Questions and Problems of new SystemVerilog commands

Reducing the cost of FPGA/ASIC Verification with MATLAB and Simulink

Guide for getting started with SystemC development

8. Best Practices for Incremental Compilation Partitions and Floorplan Assignments

SoCWire: a SpaceWire inspired fault tolerant Network on Chip approach for reconfigurable System-on-Chip in Space applications

An Introduction to the RapidIO. Bus Functional Models. White Paper

System On Chip: Design & Modelling (SOC/DAM) 1 R: Verilog RTL Design with examples.

JL Gray July 30, 2008

FIFO Generator v13.0

SpaceWire IP for Actel Radiation Tolerant FPGAs

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

32 Channel HDLC Core V1.2. Applications. LogiCORE Facts. Features. General Description. X.25 Frame Relay B-channel and D-channel

ESL design with the Agility Compiler for SystemC

Spiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.

Modeling Performance Use Cases with Traffic Profiles Over ARM AMBA Interfaces

Cadence SystemC Design and Verification. NMI FPGA Network Meeting Jan 21, 2015

Configurable UART with FIFO ver 2.20

ESA IP Cores Service Current status, activities, and future plans. Kostas Marinis ESTEC/TEC-EDM

Verilog for High Performance

Revolutionary Quad-Pipelined Ultra High Performance 16/32-bit Microcontroller v. 6.05

Modeling Asynchronous Communication at Different Levels of Abstraction Using SystemC

The Application of SystemC to the Design and Implementation of a High Data Rate Satellite Transceiver

Introduction to SystemC

Fast and Accurate Source-Level Simulation Considering Target-Specific Compiler Optimizations

Philip Andrew Simpson. FPGA Design. Best Practices for Team-based Reuse. Second Edition

SMCSlite and DS-Link Macrocell Development

08 - Address Generator Unit (AGU)

Is SystemVerilog Useful for FPGA Design & Verification?

Tech Spec for SDXC Host Controller

Universal Serial Bus Host Interface on an FPGA

How to achieve low latency audio/video streaming over IP network?

Multi-core microcontroller design with Cortex-M processors and CoreSight SoC

A framework for verification of Program Control Unit of VLIW processors

Verification of Power Management Protocols through Abstract Functional Modeling

Advanced Verification Topics. Bishnupriya Bhattacharya John Decker Gary Hall Nick Heaton Yaron Kashai Neyaz Khan Zeev Kirshenbaum Efrat Shneydor

FCUDA-NoC: A Scalable and Efficient Network-on-Chip Implementation for the CUDA-to-FPGA Flow

Single Channel HDLC Core V1.3. LogiCORE Facts. Features. General Description. Applications

SpaceWire Technologies deliver multi-gigabit data rates for on-board Spacecraft. SpaceTech Expo Gregor Cranston Business Development Manager

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits

Turbo Encoder Co-processor Reference Design

EE 4755 Digital Design Using Hardware Description Languages

CoFluent Design FPGA. SoC FPGA. Embedded. Systems. HW/SW

The CoreConnect Bus Architecture

INT G bit TCP Offload Engine SOC

Jump-Start Software-Driven Hardware Verification with a Verification Framework

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

MOST (Modelling of SpaceWire Traffic): MTG-I simulation presentation

DO-254 Testing of High Speed FPGA Interfaces by Nir Weintroub, CEO, and Sani Jabsheh, Verisense

Open Source Traffic Analyzer

Appendix SystemC Product Briefs. All product claims contained within are provided by the respective supplying company.

Integrated Device Technology, Inc Stender Way, Santa Clara, CA Phone #: (408) Fax #: (408) Errata Notification

Integrate Ethernet QVIP in a Few Hours: an A-to-Z Guide by Prashant Dixit, Questa VIP Product Team, Mentor Graphics

Shortest path to the lab. Real-world verification. Probes provide observability

SpaceWire PC Card Development. Patria New Technologies Oy ESA / ESTEC

Network simulation with. Davide Quaglia

Optimizing Cache Coherent Subsystem Architecture for Heterogeneous Multicore SoCs

SPACEFIBRE. Session: SpaceWire Standardisation. Long Paper.

Graphics: Alexandra Nolte, Gesine Marwedel, Universität Dortmund. RTL Synthesis

Extreme Low Latency 10G Ethernet IP Solution Product Brief (HTK-ELL10G-ETH-FPGA)

Sunburst Design - Advanced SystemVerilog for Design & Verification by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

NetSpeed ORION: A New Approach to Design On-chip Interconnects. August 26 th, 2013

Transcription:

SpaceWire Design of the SystemC model of the SpaceWire-b CODEC Dr. Nikos Mouratidis Qualtek Sprl. 36 Avenue Gabriel Emile Lebon B-1160, Brussels, Belgium 19/09/2011

Activity objectives: High-level modeling of the ESA SpaceWire using SystemC TLM 2.0 SystemC Simulation speed TLM 2.0 Interoperability Functional validation and timing accuracy analysis of said model Model functions identical to RTL IP core Reported timing is useful for system performance evaluation Intended uses of activity outputs: Allow ESA to develop new VPs based on the available SystemC IP Models and distribute them to contractors without being subject to any fee or restriction, allowing software development before SoC hardware is ready ESA will license the SystemC IP Models without being subject to any fee or restriction and allow contractors to develop new VPs using the guidelines in the model documentation and perform design space exploration for future SoCs to be implemented either as ASICs or on FPGA Project Overview

Why is the model of an existing IP necessary? Royalty-free access Development of VPs prior to commitment / licensing Actual IP licensed only after grounds for commitment Licensing process does not stall development Simulation speed x10s to x1000s improvement over RTL simulation Simulation kernel constitutes part of model Linked library No specialized simulation tools necessary Interoperability Compliant models utilise standardised interface TLM 2.0 implements interoperability layer Model may be directly used in compliant platforms No interface adaptations necessary Different use cases demand different level of detail Software development LT (b_transport) Design space exploration AT (nb_transport) Motivation

Point-to-point data connection Lightweight protocols Low-latency data transfer Flow controlled (w.r.t to alternatives) (minimal buffering) (data loss avoidance) low-complexity technology for building scalable, fault tolerant networks using routing switches connected by point-to-point links Aims at equipment compatibility and reuse High speed data link Minimum speed is ~2Mb/s, maximum 400Mb/s Widely adopted SpaceWire standard *

network i/f SpacewireTop host i/f CSpacewLinkTop to spacewire network from spacewire network Spacewire TLM Initiator Socket Spacewire TLM Target Socket SpW char/packet SpW char/packet Tx credit error, FCT sent, reset link FSM CTxEncode LinkFSM enable Txer, reset Txer, send FCT CRxDecode FIFO i/f Status Reg i/f Control Reg i/f FIFO i/f Tx FIFO (CUntimedFifo) Status Register (CStatusReg) Control Register (CControlReg) Rx buffer (CUntimedFifo) FIFO i/f write host time codes Status Reg i/f Control Reg i/f FIFO i/f write SpW N-chars read status write contol read network time codes read SpW N-chars transaction checking + address decoding logic TLM-2.0 Target Socket from host CODEC to manage connection and data flow across SpW link L-chars (link) and N-chars (normal) L-chars - flow control N-chars - information (data, EOP, timecodes, etc.) SpaceWire IP overview Configurable conf. class + macros Pipelined / non pipelined DDR or SDR outputs Transmission clk configuration options Configurable receive buffer size Discard empty packets Reserve timecodes when link inactive Observation points, module names, addresses

Timing report target examples (±20%) Tx 1024 bytes@200mbits, 1024 byte packet: 51.22 us (159.937 Mbps effective rate) Tx 1024 bytes@200mbits, 1 byte packet: (114.286 Mbps effective rate) Delay between ErrorReset and ErrorWait: Delay between ErrorWait and Ready: 103 ns 6.4 us 12.8 us Several times faster on same machine Internal accuracy Character level Interface accuracy LT: transfers at the packet level AT: transfers at the character level no flow control all control in place Implementation constraints

Dual coding style targets - Interfaces at two different accuracy levels implemented (AT and LT) Dual data abstraction layers Exchange (Character) and packet level General Modelling Style TLM 2.0 TLM Interfaces Base protocol/generic payload host side, custom net side Functional compliance (TLM RTL) Same input same output Timing accuracy - Max Divergence from RTL: 7% (vs. 20% target) Timing behaviour Matched to RTL (AT, exchange level) Simulation Performance - Assessed against RTL IP Up to 1000s times faster than RTL Scalability Memory footprint / CPU load - minor increase when multiply instantiating Self containment Complete package delivered, no 3rd party deps. CAD tool independence gcc tested on Linux, cygwin Build system cmake based Implementation characteristics

Separate computation and communication Communication class TLM 2.0 forward/backward interface Read and write wrappers for computation callbacks Computation class Data operations Definition of four base classes Multiply inherited by most blocks Inter-process communication using callbacks Data represented as arrays of bytes Assure compatibility with any host, regardless of endianess Selection through constructor argument Coding style Interface data abstraction level Model structure

Timing annotations instead of explicit timing Communicating processes exchange timing related information instead of actually delaying simulation WAIT statements are aggregated, thus avoiding multiple context switches Use of callbacks rather than events Temporal decoupling Individual SystemC processes are permitted to run ahead without actually advancing simulation time until they reach the point when they need to synchronize with the rest of the system SystemC processes run ahead of simulation time for an amount of time known as the time quantum Simulation control Details like transaction tracing and value recording are done through SystemC coding Unlike vendor specific simulation tools that use script languages and GUI commands to control simulation details Implementation decisions - I

Runtime vs Compile-time configuration Central point of configuration for the whole model, giving the end user the option to select simulation parameters, even the data abstraction level (packet vs character), and the coding style (LT vs AT). These features would typically be implemented in #ifdef statements. LT/AT switching Style switching during model execution Compliance checking for communicating instances Loosely Timed helps in advancing simulation faster during sections not important for particular use case Approximately Timed provides increased timing detail and data accuracy, but slows simulation down LT -> AT - Switching has to delay for the length of the maximum 'wait' within all outstanding b_transport calls AT -> LT - If outstanding nb_transport calls exist, issuing of b_transport calls is stalled until every single nb_transport completes Implementation decisions - II

AT for accuracy + LT for speed in same model Independent Character or Packet level abstraction BUT Partial model switch Host side fixed at character level Network side switchable between character and packet levels Run-time switch of network side possible 4 possible combinations Character/packet AT/LT Abstraction levels combination

TBV - Transactor Based Verification Original testbench used - Mixed RTL-TLM simulation performing the complete set of testbenches supplied with RTL TLM model interfaced through transactors Automated verification mechanisms from RTL maintained to great extent Satisfy assertions of testbench Possibility to adopt incremental block replacement using some transactors internally Variable and Transaction Recording Values of a variable across time recorded using value-change callback functions Recording timing information and attribute information associated with transactions SystemC only vs RTL only Verification strategy

Compare TLM and VHDL results using Varying number of fixed-size packets Fixed number of varying size packets Simulation time logged in both models Timing accuracy assessed Computer time logged in both models Speed of execution assessed Single testbench to run multiple scenarios in accordance to configuration Timing and speed comparisons

SpaceWire TB (RTL) UUT (RTL) Cmd script Log Transactor Cmd1 Cmd2 Cmdx UUT (TLM) Testbench re-use method

SoC1 SoC2 CHostEmulator1 CSpacewireTop1 CSpacewireTop2 CHostEmulator2 SpW characters/ packet tx logic Tx time codes logic SpW characters/ packets rx logic Status register read and time codes rx logic TLM-2.0 i/f TLM-2.0 i/f Tx FIFO Rx Buffer Status Register Control Register CSpacewLinkTop Spacewire i/f Spacewire i/f CSpacewLinkTop Tx FIFO Rx Buffer Status Register Control Register TLM-2.0 i/f TLM-2.0 i/f SpW characters/ packet tx logic Tx time codes logic SpW characters/ packets rx logic Status register read and time codes rx logic Completely tests the TLM implementation Normal functionality, corner cases, handling of abnormal situations Allows direct speed comparisons Each host utilizes 4 SystemC processes to generate data for and receive data from the SpaceWire CODEC model: TxCharsTh() RxCharsTh() ReadStatusRegTh() TxTcodesTh() SystemC only verification

SpaceWire CODEC Model (400 packets, 10K characters, 40 timecodes) Simulation duration and time Simulation Duration (seconds) Simulation Time (nanoseconds) RTL 2824 4223644493 AT-exchange level 84 4222377400 LT-exchange level 65 4221724000 AT-packet level 3 4002783700 LT-packet level 2 4221724000 Performance improvement SpaceWire CODEC Model Speedup ratio AT-exchange level 1:33 LT-exchange level 1:43 AT-packet level 1:941 LT-packet level 1:1412 Timing accuracy SpaceWire CODEC Model Timing accuracy (%) AT-exchange level 99.97 LT-exchange level 99.95 AT-packet level 94.77 LT-packet level 99.90 Results

Protocol constraints dominate implementation choices Flow control in packet level - Error injection mechanisms Phase decomposition in AT Single phase transactions Custom interface on network side (vs. objective) SpW not appropriate for base protocol/generic payload Simulation speed improvement (vs. RTL) Iterative code optimisations to attain performance targets Dual data abstraction levels and combinations Dual implementation in several places due to: Differences in data handling because of lack of mechanisms (e.g. flow control) Independent to coding style to allow combinations Optimisations to allow streamlined use Transactor complexity Interaction between SystemC model and transactor processes in order to produce the least amount of event notifications possible Encountered issues

Modeling task has to be finely focused Solid understanding of implementation subject Well defined interfaces Good knowledge of system timing Adopt an architecture suitable for a stepped implementation approach Allow for additional details from preliminary spec Compromises made have to be fully assessed Timing inaccuracies considered a priori and in retrospect Mixed-language models (SystemC + VHDL or Verilog) Pose diversions from pure scenario Experience gained

Keep implementation of building blocks as simple as possible Avoid breaking up functionality in many functions Function calls reduce overall model execution speed Use module member variables in place of local variables within functions Local variables incur performance penalty - constructed every time the function is entered Use callbacks and reduce events usage Callbacks used in place of event notifications for inter-process communication incur lower delays and increase execution speed Dual coding style/double data abstraction Complete isolation of data and communication Transactor complexity Attributed to complexity of RTL TB I/F signal-by-signal approach Lessons learned

Thank you

Backup slides

Tradeoffs: accuracy vs speed Data abstraction Bit level avoided Communication abstraction Temporal decoupling Tradeoffs: code elegance vs speed Macros instead of configuration variables Tool peculiarities Mixed language simulation constrains TLM Conditional defines in code Catering for tested compilers Compiler option alternatives in makefiles Code adapted when compilation problems existed Aspects of implementation

SpaceWire-b (SpW-b) CODEC compliant with SpaceWire standard serial transmitter/receiver full-duplex, bidirectional, point-to-point data link Data Tx via 2 (pairs of) wires using LVDS The clock can be recovered as (D xor S) Phase-locked-loops are not needed Accurate control of clock frequencies not needed Link failure detected by loss of the derived clock signal Operation: a SpaceWire node sends Tokens to the node on the other end of the link Each Token that a node sends indicates to the receiving node that the sender has 8 bytes of available buffer space Three tokens would indicate there are 24 bytes of available space in the Host System buffer Both nodes are senders and receivers of Tokens and data etc. Host System (Node 1) DS DS Subsystem (Node 2) SpaceWire CODEC

Initiative announced 12 years ago 27-9-1999 Open SystemC announcement Originates in Scenic programming language SpecC was chief competitor Open SystemC Initiative (OSCI) formed 2000 TLM 1.0 standard released 2005 SystemC v2.2 released 2007 TLM-2.0 LRM, TLM-2.0.1 lib.released 2009 SystemC AMS extensions 1.0 LRM 2010 released A bit of history

Replacement of FCT sending method with corresponding callback Optimisation to the Begin Response method Modification to behavior of control and status registers Eliminated polling Reversal of notification between TX/RX methods and FIFO Polling essentially becomes event driven mechanism In address decoding: if()-else() replaced by case Performance improving modifications

RTL core provides meticulous testbench Re-use methodology desirable Interface (e.g. transactors) Timing satisfy assertions of testbench Verification coverage 90% of code Verification challenges

Build platform SystemC 2.2.0 TLM 2.0.1 SCV 1.0e GCC version 4.3.4 Cmake version 2.8.1 Waveform viewer GTKWave Tools

Target for the host side Initiator for the network side Read data from Tx FIFO Credit counter maintenance Credit Error indication Execution thread CTxEncodeInitTh() Spacewire chars CTxEncodeTop TLM-2.0 i/f CTxEncode Tx FIFO i/f TLM-2.0 i/f data chars + EOPs host time codes inter-module i/f write requests (FCTs, current link state) write requests (Tx credit error) Transmitter

Process target transactions Extract characters Store into Rx buffer Process time codes Maintain flow control Request FCT transmission Realise LinkFSM Execution thread RxDataTh() Spacewire chars CRxDecodeTop TLM-2.0 i/f CRxDecode Rx buffer i/f TLM-2.0 i/f data chars + EOPs/EEPs link time codes inter-module i/f write requests (Tx credit error) write requests (FCTs, current link state) Receiver

TLM interface for VHDL TB Translate between transactions and signals TLM interface for Receiver & Transmitter Custom interface to Rx/Tx buffers To be converted to TLM RTL interface for VHDL TB CDeltaSpacewTractTop TLM-2.0 i/f link time code i/f rx data i/f TLM-2.0 i/f tx data i/f RTL i/f CDeltaSpacewTract host time code i/f Rx buffer i/f Tx fifo i/f link time codes host time codes data chars + EOPs/EEPs data chars + EOPs Transactor

Run Send Time Codes/ FCTs/N Chars/NULLs Enable Rx gotfct Connecting Send FCTs/NULLs Enable Rx RxErr OR CreditError OR [Link Disabled] RxErr OR gotn Char OR gottime Code OR after 12,8 us Reset ErrorReset Reset Tx Reset Rx RxErr OR gotfct OR gotn Char OR gottime Code OR after 12,8 us RxErr OR gotfct OR gotn Char OR gottime Code After 6,4 us ErrorWait Reset Tx Enable Rx RxErr OR gotfct OR gotn Char OR gottime Code After 12,8 us Ready Reset Tx Enable Rx gotnull Started Send NULLs Enable Rx [Link Enabled] LinkFSM