beautypg.com

Avalon-mm slave bfm with avalon-st api wrapper – Altera Avalon Verification IP Suite User Manual

Page 62

background image

May 2011

Altera Corporation

Avalon Verification IP Suite User Guide

4. Avalon-MM Slave BFM with Avalon-ST

API Wrapper

The Avalon-MM Slave BFM with Avalon-ST API Wrapper provides an alternative
way for the Avalon-MM Slave BFM API to support VHDL testbenches. You can use
the Avalon-MM Slave BFM with Avalon-ST API Wrapper in HDL simulators that
support mixed language simulation.

1

The API wrapper is only supported in SOPC Builder. The API wrapper cannot be
generated in Qsys to create VHDL simulation models.

The Avalon-MM Slave BFM with Avalon-ST API Wrapper component is implemented
in SystemVerilog and uses an API wrapper to cast the Avalon-MM BFM’s method
calls and returns into signals that are carried on the call and return interface ports. To
call a method, the method identifier is inserted into the wrapper component via the
channel field; the data is the arguments for the method. After the method is complete,
the data field transports the arguments for the method call. The response is returned
on the response Avalon-ST interface, and that Avalon-ST data signal carries the return
value. The wrapper is necessary because VHDL can only access ports and does not
support the method calls across hierarchical boundaries used in the Avalon-MM
Master BFM field.

Figure 4–1

provides a high-level view of this VHDL testbench

communicating with the BFM.

Figure 4–1. Avalon-MM Slave BFM with Avalon-ST Wrapper

Avalon-MM Slave BFM

Translator

API Methods

(tasks & functions

SystemVerilog)

API Calls and Returns

Ports to References

Avalon-MM Master

VHDL

Testbench Using Mixed-Language Simulator

Avalon-MM

Avalon-ST

Function

Calls

Avalon-ST

Function

Returns

Avalon-MM Slave BFM with Avalon-ST Wrapper

API Call

Interface

Test Program

VHDL