Puneet Arora ESCUG 09 Abstraction Levels in So

Puneet Arora ESCUG, 09 Abstraction Levels in So. C Modelling

Agenda • • Introduction Abstraction levels Terminologies Implementation Example Adaptors Conclusion and References

Introduction • So. C Modelling: Software model / Executable representation of So. C • Various use cases – Functional verification – Early s/w development – HW/SW partitioning, resource sharing – Architecture Exploration – Verify memory and bus designs – Cycle accurate h/w models

Abstraction Levels • Required to cater to different use-cases • Control amount and frequency of communication • Control simulation speed and accuracy • System. C signal: RTL • TLM 2. 0 (Payload / Phases): Higher abstractions

Terminologies. . Popular Terminology • Programmer's View: functional correct, fast models for embedded software development • Architect's View: explore design features like bus-width, memory organization, die-area etc • Verification View: cycle-accurate modelling, simulate actual timing and memory requirements, closest to RTL

Terminologies. . OCP-IP modelling kit • Introduces four levels – TL 1: cycle accurate modelling, supports all dataflow signals of OCP through extensions and phases – TL 2/TL 3: approximate timed modelling, fewer extensions and phases – TL 4: loosely timed modelling, phases are not used, blocking transport mechanism is used – Compatible with OSCI BP wherever possible

Terminologies. . • • • OSCI TLM 2. 0 Provides generic framework for memory mapped busses Defines a Base protocol Provides infrastructure for extending base protocol to model at different abstraction levels Recommends two coding styles Abstraction levels not well defined

Terminologies. . • • STARC TLM Guideline Uses timing and data granularity axis to define abstraction levels Combines points on these axis to define Abstraction levels Timing : Un. Timed, Approximately. Timed, Cycle. Accurate Data : TRansaction, Bus. Phase, Bus. Cycle, Bus. Signal

Terminologies. . Source: STARC TL Guideline, 2 nd Edition

Terminologies. .

Terminologies. .

Mapping Use. Cases Source: STARC TL Guideline, 2 nd Edition

Implementation • By extending OSCI TLM 2. 0 – blocking and non_blocking transport APIs – blocking can use wait, temporal decoupling – non_blocking uses phases and PEQs – Extend protocol for lower abstraction levels or bus specific features • typedef generic_payload • Define new phases

Implementation Example OCP-IP Modelling Kit • Support for advanced communication protocols at various abstraction levels – Built on top of TLM 2. 0 – Payload extensions – Phase extensions – Master Sockets with memory management for payload and extensions – Slave sockets with PEQ for timing annotations

Implementation Example. . OCP-IP TL 1 • Cycle accurate using extensions & phases • Support for individual beats of burst transfers • Different from OSCI BP – Enforces END_X for every BEGIN_X – Allows phase overlap – Disallows use of TLM_COMPLETED(no shortcuts) – Modules synchronized at boundary of same clock and supports non-default timing

Implementation Example. .

Implementation Example. . OCP TL 2 • Used for Approximate Timed coding styles • Acts as bridge between TL 1 and TL 3 • Phases like TL 1 but exact clocking is optional • Used for intra-burst timing

Implementation Example. . OCP TL 3 • Data phases are not used • Some extensions are not used as intermediate timing is not captured • Maximum interoperability with OSCI BP • Different bursts are indistinguishable as data transfer completes in one go • Synchronized at interface method calls

Implementation Example. . TL 3 example : phases same as OSCI BP

Implementation Example. . TL 3 example : request_accept_delay and response latency is zero

Implementation Example. . OCP TL 4 • • loosely timed coding style of OSCI BP Phases are not used Transfer completes when b_transport returns Detail timing behavior not modelled

Adapters Models at different abstraction levels are to be connected -Skip intermediate phases by combining them -May need to arrange data within themselves

Adapters TL 1 Master to TL 3 Slave Beg_Req Beg_Data Beg_Req End_Resp

Adapters TL 4 Master to TL 3 Slave b_transport nb_tr ( beg_req) wait() Return b_transport nb_tr ( beg_resp)

Conclusion • OSCI TLM 2. 0 can be extended to implement different abstraction levels. OCP-IP TLM Kit extends TLM 2. 0 for OCP-IP bus protocol. • Models at different abstraction levels can be easily connected using adapters

References • OSCI TLM 2. 0 User Manual • OCP-IP TLM Modelling Kit Manual • STARC TLM Guide, 2 nd Edition

So. C Modelling Services (System. C, TLM 2. 0) info@circuitsutra. com Questions
- Slides: 27