AMBA Transactors User and Reference Guide: Product Version 5.4 May 2005
AMBA Transactors User and Reference Guide: Product Version 5.4 May 2005
AMBA Transactors User and Reference Guide: Product Version 5.4 May 2005
Guide
Product Version 5.4
May 2005
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
How to Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Platform Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1
Transaction-Based Verification Overview . . . . . . . . . . . . . . . . . . . . . . . 5
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transaction-Based Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Non-Transaction-Based Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transaction-Based Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Why move to Transaction Based Verification? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Sources of Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
6
6
7
7
8
2
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Installation and Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
AMBA Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
AMBA Transactor Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Construction and Instantiation of the Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Construction and Instantiation of the Slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Construction and Instantiation of the Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Verilog System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
VHDL System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3
Introduction to the AHB Transactors Family . . . . . . . . . . . . . . . . . . . 31
Introduction
May 2005
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
32
38
38
38
39
39
40
40
40
40
41
41
42
42
4
AHB Transactor Reference Information . . . . . . . . . . . . . . . . . . . . . . . . 43
AHB Master Transactor Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AHB Master Transactor Overall Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Master Configuration Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Master Transaction-level Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pull Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Push Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ahb_arg_t Public Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ahb_arg_t static public methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and using transaction handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AHB Master Pin-Level Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AHB Master Transaction Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Endian Format of the Data Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Start Delay Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bus Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transfer Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Insertion of BUSY cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retried bursts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Early terminated bursts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
May 2005
45
45
47
49
50
52
59
72
75
75
77
84
85
85
85
87
88
88
A
Appendix A - References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Glossary
May 2005
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
May 2005
Preface
The purpose of this document is to describe the Cadence AMBA-AHB transactors developed
in SystemC. The Transactors are used to test design that are compliant with the AMBA AHB
protocol. Cadence Transactors are behavioral models intended to support the functional
verification of ASIC and system designs. These models are written in C++ using the
TestBuilder-SystemC libraries provided in the Cadence LDV package.
Prerequisites
A verification team using this document should have the following set of knowledge and skills:
C++ (Required)
May 2005
SystemC (Recommended)
See the NC-SC Simulator User Guide for information on Cadence SystemC.
Note: Skills indicated as Recommended are not required, but knowledge of those skills will
contribute to a better understanding of the tasks.
Platform Support
The AMBA-AHB Transactors have been tested and are supported on the following platforms:
Sun-Solaris 8
HP-UX11.0
May 2005
Contact Information
For answers to your sales questions please send an e-mail to avs@cadence.com or contact
your sales representative.
Additional information can be found on the web at:
www.cadence.com/methodology_services.
The table below lists the Worldwide Cadence Support contact information:
Table 1-1
Region
Phone
Fax
North America
support@cadence.com
1(877)CDS-4911 or
1(877)237-4911
(512)349-7131
Japan
crc_japan@cadence.com
+81-45-475-2223
+81-45-475-2224
(from other countries) (from other
countries)
0120-194-655 (from
Japan)
Central Europe
germany_crc@cadence.co +49-89-4563-1900
m
0120-667-281
(from Japan)
+49-89-4563-1919
+31-4020-89211
(Benelux)
+44-1344-865444
(UK)
+44-1344-869660
(UK)
+46-8-56612390
(Sweden)
+46-8-7520250
(Sweden)
+972-995-11799
(Israel)
Southern Europe france_crc@cadence.com +33-1-34-88-53-32
+33-1-34-88-53-51
(from other countries)
0800-32-32-31
(from France)
Hong Kong
hk_crc@cadence.com
+852-2377-7111
+852-2377-2802
Korea
korea_crc@cadence.com
+82-2-3770-0770
+82-2-3770-0771
May 2005
Phone
P.R. of China
Fax
+8621-63850977
(Shanghai)
Singapore
singapore_crc@cadence. +65-895-5151
com
+65-569-0688
Taiwan
taiwan_crc@cadence.com +886-35-778-951
+886-35-780-422
May 2005
1
Transaction-Based Verification Overview
This chapter gives you an overview of transaction-based verification. The chapter tells you
about the benefits of transaction-based verification and how a transaction-based verification
methodology can help your verification effort.
This chapter contains the following topics:
Introduction on page 5
Introduction
Transaction-based verification lets you develop simulation test benches and analyze and
debug simulations at a higher level of abstraction than simply using an HDL.
Transaction-based verification consists of transactions and transactors.
A transaction is a high-level transfer of data from one device to another over a well-defined
interface. Transactions can be as simple as a read or write, or as complex as passing a data
packet through a design.
A transactor is a device that executes a transaction. The transactor connects to a design
under verification (DUV) at a design interface and serves as an abstraction layer between the
test program and the design.
Cadence has developed key transactors like the AMBA AHB transactor, the USB transactor,
and the PCI family of transactors. These transactors are written in C++/SystemC. To use a
transactor, a test engineer writes tests in C++/SystemC, calling tasks and functions, which
are implemented in the transactor.
May 2005
Transaction-Based Verification
Transaction-based verification raises the level of abstraction from signals to transactions. This
means that a test engineer can concentrate on writing tests and improving the overall
verification effort rather than being concerned with low-level signal-based tasks. A
transaction-based verification methodology also encourages the re-use of test components
and transforms components like transactors into intellectual property (IP).
Non-Transaction-Based Verification
An example of a typical setup for the verification of a block- and chip-level digital register
transfer level (RTL) design is illustrated in Figure 1-1 on page 6. As shown in the figure, the
verification setup consists of the design under verification and a stimuli and response
generator.
Figure 1-1 Non-Transaction-Based Verification Architecture
Stimuli/Response
Generator
In operation, the DUV is provided with test stimuli from a stimuli/response generator, which
also checks the results of the test. The interface between the testbench module (which is the
stimuli/response generator) and the DUV are at the signal level. Therefore, the test engineer
writes signal-level tests, which include the details of the communication of the tests with the
DUV interface.
For example, assume that the interface between the stimuli generator and the DUV is a bus
with typical signal-level elements such as a data bus, an address bus, and control signals
(such as read/no_write, chip_select, and so on). A test engineer needs to write tests
toggling all of these signals, in the correct sequence, in order to generate the correct interface
protocol.
May 2005
Transaction-Based Verification
Figure 1-2 on page 7 shows a transaction-based verification architecture. In the
transaction-based architecture an extra layer, the transactor, is introduced between the
stimuli/response generator and the design under verification.
The test engineer writes tests using transactions. A simple example of a possible transaction
is as follows:
write(data, address)
The details of how the write transaction is translated into signal accurate values and
protocol specific sequence activating the data, address and the control signals is taken care
of by the transactor.
Figure 1-2 Transaction-Based Verification Architecture
Stimuli/Response
Generator
Transactor
Self-checking tests
Bus monitors
Random tests
May 2005
2
Getting Started
This chapter defines the procedures you use to prepare and use the AMBA family of
transactors and contains the following topics:
NC-SC
C++ Compiler
Note: Check the Whats New for specific versions of each of the tools that are supported for
a specific release.
Installation
The AMBA transactors are installed using Cadences SoftLoad utility. For instructions on
using SoftLoad see the Cadence Installation Guide. The installation guide takes you
through the complete installation procedure through testing the validity of your installation.
May 2005
Where platform is sun4v for Solaris, hppa for HP-UX, lnx86 for Linux. For example the
following path is for the Solaris platform:
tools.sun4v/tvmsc/amba20
libContains the required library files for the components shared object file.
vhdlContains the VHDL wrappers for master, slave, and monitor transactors.
AMBA Configuration
The library for AMBA transactors is available in the lib subdirectory. This subdirectory
contains a library compiled with GNU and NATIVE compilers on different platforms. To set
up the correct configuration following steps are required:
When you run the command, the following output appears on your screen:
./setup
May 2005
10
Verify that the following softlinks are created in the lib subdirectory:
libahb20_32b.so -> libamba20-bw32-ius53-native.so
libahb20_64b.so -> libamba20-bw64-ius53-native.so
libahb20_128b.so -> libamba20-bw128-ius53-native.so
11
12
13
master_tx_port->push( master_transaction_handles[i] );
//end of for(transaction) iteration loop
//Make sure that the last transaction submitted for both masters are
//complete before returning
master_transaction_handles[NUM_TRANSACTIONS]->wait_for_finish_event();
May 2005
14
tb_out
May 2005
15
Verilog System
At the top level, there are five inter-connected components:
1. MasterahbMaster (or Host DUV)
2. SlaveahbSlave (or Device DUV)
3. MonitorahbMonitor
4. ahbBusahbBus
5. topTestbenchtopTest
May 2005
16
17
[2:0]
ahb_burst_M1;
[3:0]
ahb_prot_M1;
[data_bus_width-1:0]
ahb_w_data_M1;
ahb_req_M2;
ahb_lock_M2;
[31:0]
ahb_addr_M2;
[1:0]
ahb_trans_M2;
ahb_write_M2;
[2:0]
ahb_size_M2;
[2:0]
ahb_burst_M2;
[3:0]
ahb_prot_M2;
[data_bus_width-1:0]
ahb_w_data_M2;
ahb_addr;
ahb_trans;
ahb_write;
ahb_size;
ahb_burst;
ahb_prot;
ahb_w_data;
ahb_r_data;
ahb_ready;
ahb_resp;
May 2005
18
19
20
May 2005
21
sc_module class in SystemC; they must also match in order, mode and type.
PARAMETERS
parameter
big_endian
= 1,
data_bus_width = 32,
addr_hold = 1;
// Ports
input
ahb_clk;
input
ahb_resetn;
input
ahb_gnt;
output
ahb_lock;
output
ahb_req;
input [1:0]
ahb_resp;
input
ahb_ready;
input [data_bus_width-1:0] ahb_r_data;
output [data_bus_width-1:0] ahb_w_data;
output [3:0] ahb_prot;
output [2:0] ahb_burst;
output [2:0] ahb_size;
output
ahb_write;
output [1:0] ahb_trans;
output [31:0] ahb_addr;
ifdef SCHDL
Dynamic Parameters
reg big_endian_dp;
reg
reg
reg
reg
reg
reg
reg
reg
reg
[31:0] ahb_addr;
[1:0] ahb_trans;
ahb_write;
[2:0] ahb_size;
[2:0] ahb_burst;
[3:0] ahb_prot;
[data_bus_width-1:0] ahb_w_data;
ahb_req;
ahb_lock;
initial begin
ahb_addr = 32hFEFFE000;
ahb_trans = 0;
ahb_write = 0;
ahb_size = 0;
May 2005
22
May 2005
ahb_clk;
ahb_resetn;
ahb_ready;
ahb_sel;
ahb_addr;
ahb_write;
ahb_trans;
ahb_size;
ahb_burst;
ahb_w_data;
23
ahb_master;
ahb_mastlock;
ahb_prot;
ahb_ready_out;
ahb_resp;
ahb_r_data;
ahb_split;
split_capable_dp;
enable_memory_dp;
big_endian_dp;
data_bus_width_dp;
reset_response_after_use_dp;
ahb_ready_out;
ahb_resp;
ahb_r_data;
ahb_split;
initial begin
ahb_r_data = 0;
ahb_ready_out = 0;
ahb_resp = 0;
ahb_split = 0;
split_capable_dp
big_endian_dp
enable_memory_dp
data_bus_width_dp
reset_response_after_use_dp
end
initial $sc_cosim_init;
endif // ifdef SCHDL
endmodule
=
=
=
=
=
split_capable;
big_endian;
enable_memory;
data_bus_width;
reset_response_after_use;
May 2005
24
module ahb_standalone_monitor_t(
ahb_clk,
ahb_resetn,
ahb_gnt,
ahb_lock,
ahb_req,
ahb_resp,
ahb_ready,
ahb_r_data,
ahb_w_data,
ahb_prot,
ahb_burst,
ahb_size,
ahb_write,
ahb_trans,
ahb_addr,
ahb_sel,
ahb_master,
ahb_mastlock,
ahb_split
)
ifdef NCSC
// Note that the foreign attribute string value must be "SystemC".
(* integer foreign = "SystemC"; *)
endif
;
// Note that port names must match exactly port names as they appear in
// sc_module class in SystemC; they must also match in order, mode and type.
// PARAMETERS DEFAULT VALUES
// width of the data bus
parameter data_bus_width
= 128;
input
input
input
input
input
input
input
input
May 2005
[15:0]
[15:0]
[15:0]
[1:0]
[data_bus_width-1:0]
ahb_clk;
ahb_resetn;
ahb_gnt;
ahb_lock;
ahb_req;
ahb_resp;
ahb_ready;
ahb_r_data;
25
[data_bus_width-1:0]
[3:0]
[2:0]
[2:0]
[1:0]
[31:0]
[15:0]
[3:0]
[15:0]
ahb_w_data;
ahb_prot;
ahb_burst;
ahb_size;
ahb_write;
ahb_trans;
ahb_addr;
ahb_sel;
ahb_master;
ahb_mastlock;
ahb_split;
ifdef SCHDL
// connect this TVM to Testbuilder
initial begin
end // initial begin
initial $sc_cosim_init;
endif // ifdef SCHDL
endmodule
VHDL System
At the top level, there are five inter-connected components:
1. MasterahbMaster (or Host DUV)
2. SlaveahbSlave (or Device DUV)
3. MonitorahbMonitor
4. ahbBusahbBus
5. topTestbenchtopTest
The monitor component can exist in a standalone mode.
The top-level VHDL code, instantiating the three transactors and the SystemC testbench that
drives the transactors, is shown below. Note that the monitor is configured in the SystemC
stimulus and is not standalone.
library ieee;
use ieee.numeric_std.all;
use ieee.std_logic_1164.all;
entity top is
May 2005
26
:=
:=
:=
:=
1;
32;
1;
1);
27
28
ahbSlave : ahb_slave_t
generic map (data_bus_width => bus_width)
port map(
ahb_sel
=> ahbSel1,
ahb_addr
=> ahbAddr,
ahb_ready
=> ahbReady,
ahb_write
=> ahbWrite,
ahb_trans
=> ahbTrans,
ahb_size
=> ahbSize,
ahb_burst
=> ahbBurst,
ahb_w_data
=> ahbWData,
ahb_resetn => resetn,
ahb_clk
=> clk,
ahb_master => ahbMasterID,
ahb_mastlock => ahbMastLock,
ahb_prot
=> ahbProt,
ahb_ready_out => ahbReady_S1,
ahb_resp
=> ahbResp_S1,
ahb_r_data
=> ahbRData_S1,
ahb_split
=> ahbSplit_S1);
ahbMonitor : ahb_standalone_monitor_t
generic map (data_bus_width => bus_width)
port map(
ahb_clk
=> clk,
ahb_resetn
=> resetn,
ahb_gnt
=> mon_gnt,
ahb_lock
=> mon_lock,
ahb_req
=> mon_req,
ahb_resp
=> ahbResp,
ahb_ready
=> ahbReady,
ahb_r_data
=> ahbRData,
ahb_w_data
=> ahbWData,
ahb_prot
=> ahbProt,
ahb_burst
=> ahbBurst,
ahb_size
=> ahbSize,
ahb_write
=> ahbWrite,
ahb_trans
=> ahbTrans,
ahb_addr
=> ahbAddr,
ahb_sel
=> mon_sel,
May 2005
29
ahbMasterID,
ahbMastLock,
ahbSplit_S1 );
.......
.......
topTest: topTestbench;
end a1;
Note: The shells for the transactors are not shown here. Please refer to the following
directory for the definitions of these shells.
your_amba_install_dir/vhdl
The definitions follow the shell construction described in Verilog System on page 16.
May 2005
30
3
Introduction to the AHB Transactors
Family
The Cadence AMBA SystemC Transactors support the AHB bus protocols. The AMBA
Master Transactors, Slave Transactors, and Monitor Transactors constitute a complete AMBA
AHB verification environment.
This chapter contains the following topics:
Introduction on page 31
Introduction
An AHB Master Transactor is used to emulate an AHB Master bus interface, which initiates
transactions on the bus, whereas the AHB Slave Transactors respond to those transactions.
Some of the supported features of the Cadence AHB include:
All transfer types and sizes (up to the data bus width)
May 2005
31
Automatic burst early termination and continuation when the master looses the bus and
owns it back again later
Recording of overlapping bursts, address phases, and data phases in the Simvision
database
The AHB Monitor Transactor is responsible for compliance checking, as well as transaction
recording for transfers on the AHB bus. See Compliance Checks on page 152 for a list of
compliance checks Cadence offers.
The AHB Master, Slave, and Monitor Transactors handle all the AMBA-AHB interface
protocol, independently from the design, the test sequence, or coverage goals, thus making
the Transactors reusable for any AMBA bus design configuration.
Single-Master Multi-Slave AMBA AHB bus configuration shown in Figure 3-2 on page 34
Multi-Master Single-Slave AMBA AHB bus configuration shown in Figure 3-2 on page 34
Multi-Master Multi-Slave AMBA AHB bus configuration shown in Figure 3-4 on page 36
May 2005
32
Single-Master Single-Slave
The Single-Master Single-Slave configuration, shown in Figure 3-1 on page 33, does not
require any arbiter or multiplexer to manage the bus (provided that the Grant and Sel
signals are each tied to the correct values). Any green block around the AHB Master or the
AHB Slave can be replaced by a DUV.
May 2005
33
Single-Master Multi-Slave
The Single-Master Multi-Slave configuration, shown in Figure 3-2 on page 34, only requires
an address decoder to select the correct slave addressed by the Master and a multiplexer to
drive the correct Slave signals back to the Master. Any of these blocks around Master or Slave
can be replaced by a DUV. The AMBA Decoder and Multiplexer managing the bus can also
be DUVs.
Figure 3-2 Single-Master Multi-Slave AMBA AHB Bus Configuration
May 2005
34
Multi-Master Single-Slave
The Multi-Master Single-Slave configuration, shown in Figure 3-2 on page 34, needs an
arbiter to grant the bus to only one Master at a time, and a multiplexer to drive the signals of
the correct Master to the Slave. Here again, any of the block around the Master or Slave can
be replaced by a DUV. Arbiter or Multiplexer blocks can be DUVs as well.
May 2005
35
Multi-Master Multi-Slave
The Multi-Master Multi-Slave configuration, shown in Figure 3-4 on page 36, represents the
most general case of an AMBA Bus, with all its components. Once again, any of these
components can be a DUV, as detailed before in all the specific configurations.
Figure 3-4 Multi-Master Multi-Slave AMBA AHB Bus Configuration
May 2005
36
Verification Process
This chapter gives an overview of the different configurations that can be used during a
verification process. The verification of a single-master/single-slave AHB configuration and a
multi-master/multi-slave AHB configuration will be covered. Figure 3-5 on page 37 lists the
verification process flow.
Figure 3-5 Verification Process Flow
Create a top level HDL testbench instantiating
the Transactor modules and the DUV.
37
Single-master Verification
When verifying a single-master AHB configuration, the test writer must instantiate one or
several AHB Slave Transactors, within the HDL netlist. A single AHB Monitor Transactor can
be connected to all the Master and Slave Transactors on the bus to cover the whole AHB bus
activity.
In the example files top_with_monitor.v for Verilog or top_with_monitor.vhd for
VHDL, located in the following directory.
install_dir/tools.<platform>/tvmsc/examples run_ahb_master_slave
Note: There is only one instance of a AHB Slave Transactor in the directory.
In the example, three Transactors are instantiated, a Master, a Slave, and a Monitor. When
verifying a single-master configuration, substitute the Master Transactor with the actual DUV.
Single-slave Verification
When verifying a single-slave AHB configuration, the test writer must instantiate one or
several AHB Master Transactors, within the HDL netlist. A single AHB Monitor Transactor can
be connected to all the Master and Slave Transactors on the bus to cover the whole AHB bus
activity.
In the example files top_with_monitor.v for Verilog or top_with_monitor.vhd for
VHDL, located in the following directory.
install_dir/tools.<platform>/tvmsc/examples run_ahb_master_slave
Note: There is only one instance of a AHB Slave Transactor in the directory.
In the example three Transactors are instantiated, a Master, a Slave, and a Monitor. When
verifying a single-slave configuration, substitute the Slave Transactor with the actual DUV.
May 2005
38
There are two instances of AHB Master Transactors, two instances of AHB Slave Transactors,
and one instance of AHB Monitor Transactor in the directory. When verifying a multi-slave
configuration, substitute the Slave Transactors with DUVs.
May 2005
39
Transactor Interfaces
Transactor interfaces provide mechanisms for you to interact with Transactor objects created
during simulation. They provide for initial setup (mode of operation), allow you to generate
protocol operations (transaction-level interface) and abstract the operation being executed
into a graphical representation (transaction recording). They also allow you to modify the
setup during simulation (configuration interface) and allow for status checking (configuration
interface).
The general usage of the configuration interface is to set a mode of operation. For a full
description, refer toMaster Configuration Interface on page 47, AHB Transactor Reference
Information on page 43 and AHB Monitor Configuration Interface on page 129.
May 2005
40
Transaction Searches
Searches are used on a simulation database to quickly determine the current functional
coverage. When a simulation is executed, the transactions are automatically stored into the
simulation database by the Transactor. After successful completion of a simulation, you can
create searches to determine the functional coverage of the particular simulation run using
the Transaction Explorer (TxE) in Signalscan.
The transactions that are recorded contain attributes. Searches may be performed using the
attribute names. Their values can be checked, temporal relationships of transactions
(operations) can be analyzed, and operation types can be counted.
The data available for a search is dependent upon the data that the Transactor is recording
to the simulation database. Searches might include for example:
Burst Type
Response Type
Addresses accessed
Note: See the Transaction Explorer User Guide for infomation on creating TxE searches.
Also see the README file located at install_dir/tools.<platform>/txe/examples
for examples of TxE searches.
May 2005
41
Stimulus Generator
A stimulus generator is a C++ object that implements transaction sequences according to a
predefined test plan. Stimulus generators use the Transactors transaction-level interface to
inject test sequences onto the DUV interface as defined in Transactor Transaction-Level
Interface on page 40.
Refer to Chapter 2, Getting Started, for more information about how to connect your
stimulus generator with the transactor(s) instantiated in the design under verification.
Device Emulator
A Device Emulator is a C++ object that implements response sequences according to a
predefined model or test plan. It can behave as a basic memory (pre configured with data and
response delays), or deliver more elaborate responses following a complex model reacting to
the transactions occurring on the AHB bus.
May 2005
42
4
AHB Transactor Reference Information
This chapter provides the reference information about each of the AMBA Transactors. The
reference information includes:
An illustration of an AHB design, consisting of several masters, several slaves, and a monitor,
is provided in Figure 4-1 on page 44. This example is used as a reference example
throughout this document.
May 2005
43
May 2005
44
May 2005
45
May 2005
46
47
Description
bool big_endian
bool addr_hold
bool info_msg
bool debug_fsm
bool transaction_record
if transaction_record is set to
true, transactions are recorded in
Simvision.
Note: The data bus width is a compilation time constant dened in the ahb.h header le, as
shown in the following lines:
//Data Bus width value defined in the ahb.h header file
const int DATA_BUS_WIDTH = 32;//Default value = 32
As presented in AHB Master Pin-Level Interface on page 75, the data bus pins,
ahb_w_data and ahb_r_data are declared respectively of type
sc_in<sc_bv<DATA_BUS_WIDTH> > and sc_out<sc_bv<DATA_BUS_WIDTH> >.
May 2005
48
May 2005
49
A virtual pull method is used by the master transactor to get a transaction object of
class ahb_arg_handle_t each time it is ready to accept a new one. If the pull
method is directly implemented by the stimulus generator, it must not contain any
blocking call (for example, any wait for any event) and therefore must execute in 0 unit
simulation time.
If a stimulus generator uses a push interface, the ahb_arg_handle_t objects offer the
ability to wait until a specic event happens during the transaction (retry, split, lose of
grant, reset, completion). This offers some reactivity to events that may happen during
the transaction and allows you to keep track of the status and the information related to
a previously submitted transaction.
Pull Interface
As specified in the Cadence UVM (Unified Verification Methodology), a Pull interface consists
of the following five basic parts:
1. A SystemC interface definition, as illustrated in the following code listing:
template <typename T> class uvm_pull_if_t : virtual public sc_interface {
public:
virtual T pull() = 0;
};
Note: The above code shows T being returned by value. It is expected that the template
argument will be a shared pointer to a transaction object.
UVM transaction interface classes are template classes. The pull method returns an
object (of type T in the above code). This class type of the returned object will change for
a different type of transactor. For AHB Master transactors, the template type is
ahb_arg_handle_t, which is dened as:
typedef ahb_arg_handle_t scv_shared_ptr<ahb_arg_t>;
A shared pointer can be used exactly like a pointer (by using the -> operator to access
the transaction attributes and methods) but is safer because it frees the test writer from
the burden of memory management, especially when the transaction is used by several
threads (see the scv_shared_ptr class description in the TestBuilder-SystemC
Reference manual).
2. The declaration of a SystemC port in the transactor as follows:
class ahb_master_t :
May 2005
50
4. The definition of the interface member function, where stimulus transactions are created
as follows:
ahb_ahb_arg_handle_t ahb_stimulus_generator_t::pull()
{
ahb_ahb_arg_handle_t arg_p = new ahb_arg_t;//create new transaction
arg_p->set_address(0x100);
/**....Configure the transaction using the methods defined in Transaction
Argument Class on page 54)...**/
return arg_p;
}
5. The declaration of the interface class, usually in the same module that declares (in other
words, instantiates) the transactor, as follows:
class top_testbench_t : public sc_module
{
public:
ahb_stimulus_generator_t stim_gen;
}
May 2005
51
Push Interface
The Push interface includes a queue which decouples the thread of the caller (which is the
stimulus generator) from the transactor thread. This queue is placed in the function that the
transactor calls back. An implementation is shown in the following code listing.
template <typename T>
class uvm_push_pull_fifo_t
: public sc_prim_channel,
public uvm_push_if_t<T>,
public uvm_pull_if_t<T>
{
public:
virtual bool push(const T &arg) {
bool return_value = fifo.empty();
fifo.push(arg);
push_event.notify();
return return_value;
}
virtual void push_wait(const T &arg) {
fifo.push(arg);
push_event.notify();
wait(pull_event);
}
virtual T pull() {
//T should be a scv_shared_ptr or scv_smart_ptr.
//If the fifo queue is empty, return a dummy transaction which is null by default
if (fifo.empty()) {
T dummy_transaction_h;//null scv_shared_ptr
return dummy_transaction_h;
}
else
{
T arg = fifo.front();
fifo.pop();
pull_event.notify();
return arg;
}
}
May 2005
52
If the transaction queue is empty, the pull function returns a null shared pointer to the master
transactor. If the queue is not empty, then the last transaction put into the queue is popped
and sent to the master transactor.
The following listing shows what the Push interface looks like to the user of the transactor:
//non-blocking push, returns after 0-simulation time
void push(ahb_arg_handle_t &arg);
//blocking push, returns when a transaction is pulled by the transactor
void push_wait(ahb_arg_handle_t &arg);
Since these functions are members of a class that inherits from a SystemC interface class,
they are bound to a port and are called through the port pointer, which is as follows:
//UVM Push Interface Declaration
template <typename TX_T>
class uvm_push_if_t : virtual public sc_interface {
public:
virtual void push(ahb_arg_handle_t &arg)= 0;
virtual void push_wait(ahb_arg_handle_t &arg)= 0;
};
//Example of Push stimulus generator
class push_stimulus_generator_t : public sc_module {
public: sc_port<uvm_push_if_t<ahb_arg_handle_t> > master_tx_port;
SC_CTOR(push_stimulus_generator_t) {
SC_THREAD(my_test);
}
void my_test();
};
void push_stimulus_generator_t::my_test() {
ahb_arg_handle_t tx1_h = new ahb_arg_t;
tx1_h->set_address(0x100);
/**..configure a transaction as specified in Transaction Argument Class on
page 54**/
master_port->push(tx_h);
ahb_arg_handle_t tx2_h = new ahb_arg_t;
May 2005
53
By way of the return value of the pull method if the stimulus generator implements a
pull interface (Pull Interface on page 50).
By way of the argument value of the push method if the stimulus generator uses a push
interface (Push Interface on page 52).
Once the transaction is created, the associated transaction handle (transaction_h in the
example above) can be used to keep track of the transaction during its entire duration. for
example, from the moment it is queued in the master transactor until the completion of the
last transfer of the burst or the burst cancellation due to a bus reset or an ERROR response.
See Creating and using transaction handles on page 75, for information on the properties
of the transaction handles.
Table 4-2 on page 54, gives a short description of the most important transaction public
methods and attributes. Please, refer to Table 4-3 on page 57, and Table 4-4 on page 59, for
a detailed description and usage explanations of all the methods and attributes.
Table 4-2 Brief description of the ahb_arg_t public methods and attributes
Brief Description
void wait_for_start_event()
May 2005
54
Brief Description
void wait_for_finish_event()
bool wait_for_retry_event()
bool
wait_for_loss_of_grant_event()
data_array
expected_data_array
beat_delay_array
check_mask_array
void set_address(sc_uint<32>
start_addr);
Transaction address
void
set_write_transaction(bool
flag)
Read/Write
void set_null_transaction(bool
null_arg = false)
Null Transaction.
void
Burst Type
set_burst_type(
sc_uint<3> burst)
void
Transfer size
set_transfer_size(sc_uint<3>
size)
void
Protection Mode
set_prot(
sc_uint<4> prot)
May 2005
55
Brief Description
void
set_start_delay
(unsigned int num)
void
Transfer lock.
set_lock( bool )
void
set_continue_after_error( bool
flag)
void set_burst_length()
set_check_masked_data(bool
flag)
void set_num_Idle_after_retry
(unsigned int )
void
set_hold_req_after_last_transf
er( bool flag = true)
void
set_hold_lock_after_last_trans
fer( bool flag = true)
void release_req()
void release_lock()
May 2005
56
Brief Description
sc_uint
<DATA_BUS_WIDTH>
read_integer_data_array(..)
void
write_integer_data_array(..)
void fill_burst(..)
void initialise()
Array
Description
scv_sparse_array
May 2005
57
Array
Description
scv_sparse_array
May 2005
58
Array
Description
scv_sparse_array
Method
Description
void set_address(sc_uint<32>
start_addr);
May 2005
59
void set_write_transaction(bool
flag)
set_burst_type(
sc_uint<3> burst)
0 - SINGLE
void
May 2005
60
void
set_transfer_size(sc_uint<3>
size)
unsigned
unsigned
unsigned
unsigned
int
int
int
int
AHB_SIZE_BYTE = 0;
AHB_SIZE_HALF = 1;
AHB_SIZE_WORD = 2;
AHB_SIZE_2WORD = 3;
A corresponding get_transfer_size()
method returns the Burst type
(sc_uint<3> value)
void
set_prot(
sc_uint<4> prot)
void
set_start_delay
(unsigned int num)
May 2005
61
void
set_lock( bool )
void
set_continue_after_error( bool
flag)
void set_burst_length()
May 2005
62
set_check_masked_data(bool
flag)
May 2005
63
void set_num_Idle_after_retry
(unsigned int )
void set_null_transaction()
void
set_hold_req_after_last_transfe
r( bool flag = true)
May 2005
64
void
set_hold_lock_after_last_transf
er( bool flag = true)
void release_req()
void release_lock()
May 2005
65
sc_uint
<DATA_BUS_WIDTH>
read_integer_data_array(
sc_uint<32> address,
sc_uint<3> size,
bool bigEndian = false)
sc_uint
<DATA_BUS_WIDTH>
read_integer_expected_data_arra
y(
sc_uint<32> address,
sc_uint<3> size,
May 2005
66
void write_integer_data_array(
sc_uint<32> address,
sc_uint<3>
size ,
in a Little Endian
0x44;
0x33;
0x22;
0x11;
Example 2
write_integer_data_array
(0x1002, AHB_SIZE_HALF,
true,0x1122) will store the value as
shown below:
/* Storage of a half-word in a Big
Endian order, at the address 0x1002 */
dataArray[0x1002] = 0x11;
dataArray[0x1003] = 0x22;
May 2005
67
void
write_integer_expected_data_arr
ay(
sc_uint<32> address,
sc_uint<3>
size ,
May 2005
68
void fill_burst(
bool write_trans,
sc_uint<3> burst_type,
sc_uint<32> start_addr,
sc_uint<3>
size ,
69
void initialise()
May 2005
70
unsigned int
get_operation_status()
May 2005
71
unsigned int
get_num_completed_transfers()
The following methods are blocking. They should be used only if the stimulus generator
uses the push interface (Push Interface on page 52) .They should NOT be used in the
case where the stimulus generator directly implements the pull interface (see Pull
Interface on page 50).
void wait_for_start_event()
void wait_for_finish_event()
bool wait_for_retry_event()
bool
wait_for_loss_of_grant_event()
May 2005
72
Static Method
Description
static
sc_uint<32>
get_good_addr
(sc_uint<32>
address,
sc_uint<3> size)
May 2005
73
May 2005
74
Using a shared pointer to store a transaction frees the stimulus writer from the burden of
memory management. The transaction object will be automatically deleted when no
reference of its handle exists.
Once a transaction is created, the associated transaction handle (transaction_h in the
example above) can be used to keep track of the transaction during its entire duration, that
is, from the moment it is queued in the master transactor until the completion of the last
transfer of the burst or the burst cancellation due to a Bus reset or an ERROR response.
The same handle can be used to keep track of a burst transaction after a RETRY/SPLIT
response is received or if a Loss of Bus grant occurs in the middle of a burst. If any of these
events happen, the master transactor will automatically build a new burst and try to continue
the burst transaction until it is complete.
Once a transaction has been created and submitted to the transactor, the same transaction
handle can not be used to configure an other transaction until the transaction finishes. After
that, the stimulus writer must use the initialise() method to be able to use the same
handle to submit a new transaction.
In addition to returning a transaction handle to the transactor, if the stimulus generator writer
wants to keep a reference of any transaction submitted, Cadence recommends to store that
handle on an STL list or an array. Later, the stimulus generator will be informed that a
transaction is complete (e.g. using the wait_for_finish_event() or
get_operation_status()). The stimulus generator will then locate the corresponding
handle on the list of outstanding transactions and remove it. The handle of a completed
transaction can also be recycled after using the initialise() method.
May 2005
75
Ports
Description
sc_in<bool> ahb_clk
sc_in<bool> ahb_resetn
sc_in<bool> ahb_gnt
sc_out<bool> ahb_lock
sc_out<bool> ahb_req
sc_in<bool> ahb_ready
sc_in<sc_bv<AHB_DATA_BUS_WIDTH> >
ahb_r_data
sc_out<sc_bv<AHB_DATA_BUS_WIDTH> >
ahb_w_data[31:0]
sc_out<sc_uint<4> >
ahb_prot
sc_out<sc_uint<3> >ahb_size
May 2005
76
sc_out<bool> ahb_write
What is recorded on the burst pipelined stream is described in The Burst Pipelined
Stream on page 78.
What is recorded on the address phase stream is described in The Address Phase
Stream on page 79.
What is recorded on the data phase stream is described in The Data Phase Stream on
page 81).
May 2005
77
May 2005
78
Attribute
Value Range
Radix
Description
Start Address
0x0-0xffffffff
hex
Burst Type
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha-num
eirc
Transfer Size
BYTE,
HALF-WORD,
2WORD
alpha-num
eirc
R/W
Read, Write
alpha-num
eirc
79
Attribute
Value Range
Radix
Description
Start Address
0x0-0xffffffff
hex
Hburst
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha-num
eric
Hsize
BYTE,
HALF-WORD,
2WORD
alpha-num
eric
May 2005
80
Attribute
Value Range
Radix
Description
R/W
Read, Write
alpha-num
eric
May 2005
81
Figure 4-7 on page 82 shows an address phase started and a ERROR response received for
the previous transfer.
Figure 4-7 Example of data phase recording with an ERROR response
May 2005
82
Attributes
Value Range
Radix
Description
Start Address
0x0-0xffffffff
hex
Burst Type
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha-num
eric
Transfer Size
BYTE,
HALF-WORD,
WORD, 2WORD
alpha-num
eric
R/W
Read, Write
alpha-num
eric
data
0x0-0xffffffff
or
0x0-0xffffffff
ffffffff (
depending on the
data bus width: 32
or 64 bits)
hex
May 2005
83
Attributes
Value Range
Radix
Description
Expected data
0x0-0xffffffff
or
0x0-0xffffffff
ffffffff (
depending on the
data bus width: 32
or 64 bits)
hex
In the big endian example, data is driven on the AHB write data bus [31:0] as 0x00112233.
Little endian write transaction example:
startAddress = 0x10;
data_array[startAddress] =
data_array[startAddress+1]
data_array[startAddress+1]
data_array[startAddress+1]
0x00;
= 0x11;
= 0x22;
= 0x33;
In the little endian example, data will be driven on the AHB write data bus [31:0] as
0x33221100.
Data for a read transaction will follow the same mapping for a specified endian format.
May 2005
84
Bus Request
By default, the bus request (HREQ) is asserted one clock cycle before the rst
NONSEQuential transfer starts, that is, one IDLE cycle is inserted between the HREQ
assertion and the NONSEQ transfer if no transaction was already in the transactor pipeline. A
possibly larger number of IDLE cycles can be inserted using the set_start_delay
method as specied in Start Delay Specications on page 85.
HREQ remains asserted until the last address of the last submitted transaction starts. In
other words, if two or more transactions are submitted in a row, the bus request will be held
until the last address phase of the last transaction.
In some cases, it may be required to tell the transactor to hold the bus request even after the
last address phase of a transaction has completed. This can be done by using the
set_hold_req_after_last_transfer method(see Table 4-4 on page 59 and
Example of a Read-Modify-Write locked sequence on page 86).
Transfer Lock
HLOCK is asserted by the master transactor at least one cycle before the first
NONSEQuential address phase of a locked transaction starts, which prevents the arbiter
from changing the Grant signals (Refer to the AHB specification V2.0 section 3.11.1 p
3-28).
If two or more locked transactions are submitted in a row, HLOCK is held until the last
address phase of the last locked transaction starts.
May 2005
85
86
Note: In this example, the WRITE depends on the value read and HREQ/HLOCK must be held
after the READ address phase has started. If the test wants to emulate a locked sequence of
transactions which have no dependencies with each other, there is no need to use
set_hold_lock_after_last_transfer and the sequence could be emulated by a
simple succession of push calls, as follows:
/***tells to the transactor to assert HLOCK before the 1st transfer of the
locked sequence starts.***/
ahb_arg_handle_t tx1_h = new ahb_arg_t;
tx1_h->set_lock(true);
master_tx_port->push( tx1_h);
//next transaction
ahb_arg_handle_t tx2_h = new ahb_arg_t;
tx2_h->set_lock(true);
master_tx_port->push( tx2_h);
/and so on ...
87
Retried bursts
If a transfer within a burst must be retried due to a RETRY or a SPLIT response, the master
transactor will automatically build a new burst to retry this transfer and continue the remaining
transfers.
If the master transactor does not lose the bus after the RETRY/SPLIT response, it can insert
a specified number of IDLE cycles before re-transmitting the interrupted burst (see the
set_num_idle_after_retry method described in Table 4-4 on page 59).
If the master transactor loses the bus after the RETRY/SPLIT, it will start to re-transmit the
interrupted burst as soon as HGRANT and HREADY are sampled at 1, without any IDLE cycles
before the first NONSEQuential re-transmitted transfer according to the following:
If the retried transfer is the first transfer of the burst, the re-transmitted burst will have the
same type as the initial burst (For example, WRAP4, INCR8, and so on).
If the retried transfer is any other transfer in the burst, the re-transmitted burst will be an
incremental (INCR) burst.
May 2005
88
May 2005
89
The resultant response on the AHB Bus will be ERROR, for this scenario. Likewise a byte
access to 0x11 would result in a RETRY response.
Figure 4-8 on page 91 illustrates how the AHB Slave Transactor interfaces to the Device
Under Test (DUV) and also how the AHB Slave Transactor interfaces to the AHB Slave Device
Emulator.
May 2005
90
May 2005
91
May 2005
92
The CONTROL_T template structure of this class is protocol specific. A common structure
called ahb_configuration_t is used to configure all the AHB Transactors. Table 4-10 on
page 93 shows the attributes of this structure that are used to configure the AHB Slave
Transactor.
Table 4-10 Attributes of ahb_configuration_t used by the AHB Slave Transactor
Attributes
Description
bool big_endian
bool split_capable
May 2005
93
bool info_msg
bool transaction_record
If transaction_record is set to
true, transactions are recorded in
Simvision.
Note: The data bus width is a compilation time constant dened in the ahb.h header le
thus:
//Data Bus width value defined in the ahb.h header file
const int DATA_BUS_WIDTH = 32; //Default value = 32
As presented in AHB Slave Port Interface on page 120, the data bus pins,
ahb_w_data and ahb_r_data are declared respectively of type
sc_in<sc_bv<DATA_BUS_WIDTH> > and sc_out<sc_bv<DATA_BUS_WIDTH> >.
You can override this default value specified in the ahb.h file by using a compiler
directive either on the command line or in a file used to load command line arguments
as follows:
#compilers directive for DATA_BUS_WIDTH
-DDATA128
#define data_bus_width verilog parameter
+define+DATA128
The consequence of this limitation is that, a specific library of AHB transactors must be
used for each possible data bus width (32, 64 or128 bits).
An Example of Using the Configuration Interface in a Stimulus Generator
If you want to configure the AHB Slave Transactor with some non-default values, the stimulus
generator must contain a SystemC port of type:
sc_port<uvm_control_if_t<ahb_configuration_t> >
In this case, the stimulus generator must also declare a structure of type
ahb_configuration_t, as follows:
class stimulus_generator_t : public sc_module {
public:
// Slave configuration port
sc_port< uvm_control_if_t<ahb_configuration_t> > slave_control_port;
May 2005
94
May 2005
95
public:
uvm_control_if_t() : debug(0), enable(1) {}
virtual bool send_control(const CONTROL_T &) = 0;//protocol specific configuration
virtual void enable_on() {enable = 1;} //not used by AHB Slave Device Emulator
virtual void enable_off() {enable = 0;} //not used by AHB Slave Device Emulator
virtual void debug_on() { debug = 1;}//not used by AHB Slave Device Emulator
virtual void debug_off() { debug = 0;}//not used by AHB Slave Device Emulator
virtual bool get_debug() { return debug;}//not used by AHB Slave Device Emulator
virtual bool get_enable() { return enable;}//not used by AHB Slave Device Emulator
protected:
bool debug;
bool enable;
};
The CONTROL_T template structure of this class is protocol specific. A common structure
called ahb_slave_emulator_config_t is used to configure the Emulator.
Note: Only the above control interface method virtual bool send_control(const
CONTROL_T&) is implemented by the Emulator. The Emulator cannot be turned on and off
because it is a purely passive component (there is no SystemC thread running within the
module) that is, it will only be activated when requested by an AHB Slave Transactor. There
are also no debug messages associated with the Emulator.
Example of Using the Configuration Interface in a Stimulus Generator
If you want to configure the AHB Slave Device Emulator with some non-default values, the
stimulus generator must contain a SystemC control port of type:
sc_port<uvm_control_if_t<ahb_slave_emulator_config_t> >
In thi scase, the stimulus generator must also declare a class object of type
ahb_slave_emulator_config_t.
An instance of this class object must then take as a constructor argument a SystemC port. In
this case the control port to be used to configure/control the AHB Slave Device Emulator is
used as the constructor argument, for example:
class stimulus_generator_t : public sc_module {
public:
// Slave Device Emulator configuration/control port
sc_port< uvm_control_if_t<ahb_slave_emulator_config_t> > emulator_control_port;
May 2005
96
May 2005
97
Wait Cycles
Split Delay
Split Enable
Response
Wait Cycles
Split Delay
May 2005
98
Data
Split Enable
99
Method
Description
void
set_reset_response_after_us
e(
bool reset;
);
May 2005
100
void
clear_emulator();
May 2005
101
void
fill_emulator(
sc_uint<32> start_addr,
sc_uint<32> end_addr,
data_type data_generation,
sc_uint<8> byte_data,
response_type response,
unsigned int wait_cycles
);
May 2005
102
response_type::OKAY (Default if
not specified)
response_type::ERROR
response_type::RETRY
response_type::SPLIT
May 2005
103
void write_emulator(
sc_uint<32> address,
sc_uint<8> data,
response_type response,
bool split_enable
Arguments:
);
May 2005
104
void write_emulator(
sc_uint<32> address,
sc_uint<8> data,
);
6
void write_emulator(
sc_uint<32> address,
response_type response
);
May 2005
105
void write_emulator(
sc_uint<32> address,
unsigned int wait_cycles
);
void write_emulator(
sc_uint<32> address,
unsigned int split_delay,
bool split_enable
);
void write_emulator(
sc_uint<32> address,
sc_uint<8> data,
response_type response,
unsigned int wait_cycles
);
10 void write_emulator(
sc_uint<32> address,
sc_uint<8> data,
unsigned int split_delay,
bool split_enable
);
11 void write_emulator(
sc_uint<32> address,
sc_uint<8> data,
response_type response
);
May 2005
106
12 void write_emulator(
sc_uint<32> address,
sc_uint<8> data,
unsigned int wait_cycles
);
13 void write_emulator(
sc_uint<32> address,
response_type response,
unsigned int wait_cycles,
unsigned int split_delay,
bool split_enable
);
14 void write_emulator(
sc_uint<32> address,
response_type response,
unsigned int wait_cycles,
unsigned int split_delay
);
15 void write_emulator(
sc_uint<32> address,
response_type response,
unsigned int split_delay,
bool split_enable
);
16 void write_emulator(
sc_uint<32> address,
response_type response,
unsigned int wait_cycles
);
May 2005
107
17 void write_emulator(
sc_uint<32> address,
unsigned int wait_cycles,
unsigned int split_delay,
bool split_enable
);
An instance of this declaration emulator_config would then take the previously created
AHB Slave Device Emulator control port as the constructor argument (this control port is
subsequently binded to an instance of the AHB Slave Device Emulator). This is shown in
Example of Using the Configuration Interface in a Stimulus Generator on page 96.
May 2005
108
Example
emulator_config.set_reset_response_after_use(true);
emulator_config.write_emulator(0x010, SPLIT, 5,
true);
2
3
void
clear_emulator();
void fill_emulator( Fill the Slave Device Emulators Memory Address range
from 0x00 to 0x03F with Random data starting from a
start_address,
data value of 0x00, with OKAY responses and two wait
end_address,
cycles.
sc_uint<8> data = 0x00;
data_generation,
byte_data,
response,
wait_cycles
);
May 2005
109
void
write_emulator(
address,
data,
response,
wait_cycles,
split_delay,
split_enable
);
5
void
write_emulator(
address,
data
);
6
void
write_emulator(
address,
response
);
void
write_emulator(
address,
wait_cycles
);
8
void
write_emulator(
address,
emulator_config.write_emulator(0x017F, 9, true);
split_delay,
split_enable
);
May 2005
110
void
write_emulator(
address,
data,
response,
wait_cycles
)
10 void
write_emulator(
address,
data,
split_delay,
split_enable
)
11 void
write_emulator(
address,
data,
response
)
12 void
write_emulator(
address,
data,
wait_cycles
);
May 2005
111
13 void
write_emulator(
address,
response,
wait_cycles,
split_delay,
split_enable
);
14 void
write_emulator(
address,
response,
wait_cycles,
split_delay
);
15 void
write_emulator(
address,
response,
split_delay,
split_enable
);
16 void
write_emulator(
address,
response,
wait_cycles
);
May 2005
112
17 void
write_emulator(
address,
wait_cycles,
split_delay,
split_enable
);
Transactions to the AHB Slave Device Emulator are represented as objects of a class
called ahb_slave_emulator_request_t. (For a description of this class see
Transaction Argument Class (ahb_slave_emulator_request_t Class) on page 116
below). These objects can be passed to the AHB Slave Device Emulator from the AHB
Slave Transactor during normal AHB bus operations.
A virtual push method is defined within the UVM uvm_push_if_t interface class which
can be used by a SystemC port defined in the AHB Slave Transactor to push requests
into the AHB Slave Device Emulator.
Note: , In the following Transactor request description, WRITE_DATA and
UPDATE_SLAVE are the possible values of an enumerated type contained within the
ahb_slave_emulator_request_t class object, which is sent from the Transactor to
the Emulator.
The requests that the Transactor can make to the Emulator are:
WRITE_DATA requestIn this case the Transactor writes the sampled data value
(HWDATA[DATA_BUS_WIDTH]) of the data bus, during a write transfer, to the
Emulator.
UPDATE_SLAVE requestIn this case the Transactor requests the Emulator to send
to the Transactor the attribute values (data, response, wait_cycles, split_delay,
split_enable) corresponding to the address associated with the request. In the case
of data (sc_bv<DATA_BUS_WIDTH>) transfer between the Emulator and the
Transactor, the data will be aligned to the endianess of the data bus.
May 2005
113
Push Interface
In this case, a push interface is where the transactor calls a method to push a request into
the component communicating with the transactor and subsequently, in zero simulation time,
receives information relating to the request back from the component.
In the case of the interface between the AHB Slave Transactor and the AHB Slave Device
Emulator, the Transactor can push a read request into the Emulator and receive back the read
value. For example, when the Transactor needs to know the particular response it should give
to a transaction received on the address bus, it calls the the push method with an
UPDATE_SLAVE enumerated type request and receives back the response value it should
give.
There are five parts to the push interface:
1. A SystemC Interface Definition, as illustrated below:
template <typename T>
class uvm_push_if_t : virtual public sc_interface, virtual public
uvm_fifo_if_t<T> {
public:
virtual bool push(T) = 0;
virtual void push_wait(T) = 0; // not applicable for Slave Emulator
};
The port connects an AHB Slave Transactor to an AHB Slave Device Emulator through
a transaction-level interface.
May 2005
114
4. The definition of the interface member function, where the 3response type, wait cycles
number is generated in the case of the AHB Slave Device Emulator. For example:
bool ahb_slave_device_emulator::push(ahb_slave_emulator_request_t*
emulator_arg) {
switch( emulator_arg->get_device_request_type() ) {
case: UPDATE_SLAVE
emulator_arg->set_response( get_response() );
emulator_arg->set_wait_cycles( get_wait_cycles() );
emulator_arg->set_split_delay( get_split_delay() );
emulator_arg->set_data( get_data() );
break;
}
}
5. The class containing the emulator function definition is declared, usually in the same
place (such as in a high-level module in the test bench) as the class for other stimulus
generators. For example:
May 2005
115
May 2005
116
Method
void
Description
write_data(
sc_uint<32> address,
sc_bv<DATA_BUS_WIDTH>
data);
void
update_slave(
sc_uint<32> address,
sc_uint<3> size);
May 2005
117
void
set_aligned_data(sc_b
v<DATA_BUS_WIDTH>
aligned_data);
void
set_response(response
_type response);
void
set_wait_cycles(unsig
ned int wait_cycles);
void
set_split_delay(unsig
ned int split_delay);
void
set_split_enable(bool
split_enable);
May 2005
118
void
set_big_endian(bool
big_endian);
slave_emulator_push_r
equest_type
get_device_emulator_r
equest() const;
sc_uint<32>
get_address() const;
sc_uint<3>
get_size() const;
bool
get_big_endian();
May 2005
119
sc_bv<DATA_BUS_WIDTH>
get_aligned_data();
response_type
get_response() const;
unsigned int
get_wait_cycles()
const;
unsigned int
get_split_delay()
const;
bool
get_split_enable()
const;
120
Port
Direction
Type
Description
ahb_addr
sc_in
sc_uint<32>
ahb_trans
sc_in
sc_uint<2>
ahb_write
sc_in
bool
ahb_size
sc_in
sc_uint<3>
ahb_burst
sc_in
sc_uint<3>
ahb_prot
sc_in
sc_uint<4>
ahb_w_data
sc_in
sc_bv<DATA_
BUS_WIDTH>
ahb_sel
sc_in
bool
ahb_r_data
sc_out
sc_bv<DATA_
BUS_WIDTH>
May 2005
121
ahb_ready_out
sc_out
bool
ahb_ready
sc_in
bool
ahb_resp
sc_out
sc_uint<2>
ahb_master
sc_in
sc_uint<4>
ahb_mastlock
sc_in
bool
ahb_split
May 2005
sc_out
sc_uint<16>
122
ahb_resetn
sc_in
bool
ahb_clk
sc_in
bool
System Clock
The Slave Burst Pipelined StreamThe transaction recorded on this stream is an entire
burst of transfers.
The Slave Transfer StreamThe transaction recorded in this stream is a unique transfer
processed by a specific slave.
If the Slave samples HTRANS to be IDLE, indicating that the burst has been
cancelled.
If the Slave samples HTRANS to be another NONSEQ indicating a new burst transfer
is starting (Slave ends the previous burst transaction recording and starts the new
burst transaction recording at the same time).
Table 4-16 on page 124 provides a list of attributes recorded for this stream.
Figure 4-11 on page 128 shows a Simvision snapshot of Slave Burst transaction recording in
progress.
May 2005
123
Attribute
Value Range
Radix
Description
Slave
1-16
string
Start Address
0x0-0xffffffff
hex
HBURST
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha
burstLength
0x1-0xffffffff
hex
HSIZE
BYTE, Halfword,
WORD, 2WORD
alpha
R/W
Write or Read
alpha
May 2005
124
Note: The transfer transactions and the burst transactions recorded by the slave are not the
same transactions as the ones recorded in the master and the monitor transactors (see AHB
Master Transaction Recording on page 77 and AHB Monitor Transaction Recording on
page 143). This slave recording shows what is being processed by a specific slave. It allows
showing a specific slaves point of view on what is happening on the bus, and record some
specific transfer attributes which are not recorded by the other transactors (number of wait
cycles, response type).
Table 4-17 on page 126 provides a list of attributes recorded for this stream .
Figure 4-10 on page 127 shows a Simvision snapshot of Slave Transfer transaction recording
in progress.
May 2005
125
Attribute
Value Range
Radix
Description
HADDR
0x0-0xffffffff
hex
HBURST
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha
HSIZE
BYTE, Halfword,
WORD, 2WORD
alpha
Wait Cycles
0x0-0xffffffff
hex
HRESP
OKAY, ERROR,
RETRY, SPLIT
alpha
HWRITE
Read, Write
alpha
Write Data
0x0-0xffffffff
hex
Read Data
0x0-0xffffffff
hex
burstLength
0x1-0xffffffff
hex
May 2005
126
May 2005
127
May 2005
128
Check that bursts of all types do not burst longer than specified by HBURST.
May 2005
129
There are a number of methods you can use to modify all these parameters from the systemC
testbench. AHB Monitor Configuration Methods on page 136 lists the methods used to set
the values of all these systemC configuration parameters for the AHB Monitor transactor and
explains how to configure these parameters from the systemC testbench.
AHB Monitor HDL configuration parameters
The first set of parameters is the HDL configuration parameter group, listed on Table 4-18 on
page 130.
Table 4-18 AHB Monitor HDL Configuration Parameters
Parameter
Description
int data_bus_width
The data_bus_width parameter configures the data bus width of the AHB bus used for the
simulation. This parameter must be set in the HDL testbench. The corresponding type of
transactor systemC library (32, 64 or 128 bits bus width) has to be used for the simulation so
that the systemC transactor and its HDL wrapper use the same data bus width.
This is not a dynamic parameter and its value can not be changed during a simulation.
In the HDL top testbench module, a top_data_bus_width parameter has to be defined as
follows:
May 2005
130
This must be done for every instance of Master, Slave or Monitor declared in the HDL
testbench.
AHB Monitor Compliance Checks configuration parameters
This is the first set of dynamic systemC configuration parameters for the Monitor. They can
be configured from the systemC testbench. These parameters are illustrated on Table 4-19
on page 131 and allow the user to control which compliance checks are performed by the
Monitor during simulation, and how they are performed. The three possible values on each
compliance check parameter are Off (0), On (1) or Expect (2).
These parameters can be modified during simulation. The default value of each of these
parameters is On (1).
If an incorrect value, one that is not 0, 1 or 2, is passed by in, the corresponding parameter
will be set to On (1) by default.
An additional boolean parameter (check_address_not_aligned_if_idle) has also
been added to control wether the address alignment with HSIZE (controlled by
check_address_not_aligned_to_transfer_size) has to be checked for IDLE
transfers or not. Its defaulf value is true, which means that, by default, the alignment of the
transfer address with HSIZE is checked for every type of transfer including IDLE transfers. If
this switch is later configured to false, the checking wont be performed for IDLE transfers,
which can be useful to avoid spurious error messages from the Monitor in case the DUV
doesnt respect strictly that minor point of the AMBA specification.
Table 4-19 AHB Monitor Compliance Check Configuration Parameters
Parameter
May 2005
Description
131
unsigned int
check_htrans_not_idle_during_reset
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
unsigned int
check_address_not_aligned_to_transfer_size
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
Turns compliance
checks on/off/expect.
unsigned int
check_page_address_violation
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
Turns compliance
checks on/off/expect.
unsigned int
check_burst_longer_than_hburst
132
unsigned int
check_premature_end_of_non_incr_normal_burst
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
unsigned int
check_htrans_not_idle_after_non_okay_response
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
unsigned int
check_htrans_goes_from_idle_to_seq_busy
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
unsigned int
check_hsize_changes_during_burst
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
unsigned int
check_hburst_changes_during_burst
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
May 2005
133
unsigned int
check_incorrect_two_cycle_non_okay_response
Turns compliance
checks on/off/expect.
Value of this flag:
0 - Off
1 - On (Default)
2 - Expect
bool
check_address_not_aligned_if_idle
Parameter
May 2005
Description
134
bool info_msg
bool transaction_record
Parameter
Description
bool debug
bool
enable
Turns the monitor On/Off during the simulation. When turned Off, the Monitor is
also reset.
true: The Monitor is On (default).
false: The Monitor is Off.
Note: The debug message generated by the Monitor transactor are for development purpose
only and should not normally be used as they convey no general information.
The enable switch allows you to turn the Monitor transactor On or Off during a simulation.
This feature can be useful to improve the performances of the simulation in case of a very
long test case where the Monitor is not needed, without modifying the testbench.
When a monitor is switched Off, all its internal parameters are reset and its pending recorded
transactions are closed.
May 2005
135
Methods
Description
bool send_control(const
ahb_configuration_t &)
void enable_on()
void enable_off()
bool get_enable()
void debug_on()
void debug_off()
bool get_debug()
2. Then, a pointer to the ahb_monitor_t must be found and bound to the Monitor
sc_port:
May 2005
136
This gives you an access point to the Monitor from where you can call the methods listed
in Table 4-22 on page 136.
Now you can declare an ahb_configuration_t object for the Monitor:
ahb_configuration_t monitor_parameters;
Then you can modify the configuration of the Monitor by modifying any parameter in this
ahb_configuration_t object and calling the send_control() method:
monitor_parameters.info_msg = true;
monitor_parameters.transaction_record = false;
monitor_parameters.check_htrans_not_idle_during_reset = 2;
monitor_parameters.check_address_not_aligned_to_transfer_size = 0;
monitor_parameters.check_page_address_violation = 1;
monitor_parameters.check_incorrect_address_calculation = 1;
monitor_parameters.check_burst_longer_than_hburst = 1;
monitor_parameters.check_premature_end_of_non_incr_normal_burst = 1;
monitor_parameters.check_htrans_not_idle_after_non_okay_response = 1;
monitor_parameters.check_htrans_goes_from_idle_to_seq_busy = 2;
monitor_parameters.check_hsize_changes_during_burst = 1;
monitor_parameters.check_hburst_changes_during_burst = 0;
monitor_parameters.check_incorrect_two_cycle_non_okay_response = 0;
monitor_parameters.check_address_not_aligned_if_idle = false;
monitor_port->send_control(monitor_parameters);
The parameters that havent been modified since the last configuration will remain the same
after send_control() has been called. For example, if in the systemC testbench you write:
monitor_parameters.check_incorrect_two_cycle_non_okay_response = 0;
monitor_port->send_control(monitor_parameters);
May 2005
137
Pin
Direction
Description
ahb_clk
in
System clock
ahb_resetn
in
ahb_gnt[15:0]
in
ahb_lock[15:0]
in
ahb_req[15:0]
in
ahb_resp[1:0]
in
ahb_ready
in
ahb_r_data[data
BusWidth-1:0]
in
May 2005
138
ahb_w_data[data
BusWidth-1:0]
in
ahb_prot[3:0]
in
ahb_burst[2:0]
in
ahb_size[2:0]
in
ahb_write
in
ahb_trans[1:0]
in
ahb_addr[31:0]
in
ahb_sel[15:0]
in
ahb_master[3:0]
in
ahb_master_lock
in
ahb_split[15:0]
in
May 2005
139
The ahb_gnt, ahb_lock, ahb_req and ahb_sel signals are 16-bit signals and allow the
monitor to be connected to up to sixteen masters and slaves. In this specific example (two
Masters and two Slaves), fourteen bits are connected to 0 and the two bits left are connected
to the two Masters and the two Slaves instantiated in the testbench.
In a system with multiple SPLIT-capable slaves, The AMBA specification recommends that
the HSPLIT signal from each slave should be sixteen bits in width and combined by a logical
OR with all the HSPLIT bits to provide a single resultant (AMBA 2.0 specifications, paragraph
3.12 page 3-35). This resultant signal is the one that should be connected to the ahb_split
signal input of the AHB monitor transactor.
Since the AMBA specification does not explicitly require the HSPLIT signal to be sixteen bits
wide, in a user specific AHB bus design, in case the HSPLIT signal width is smaller than
sixteen bits, the unconnected bits of the ahb_split monitor input should be forced to 0. For
example, in a two Masters configuration, if ahb_split is only two bits wide. The connection
of this signal to the monitor transactor should be:
.ahb_split({14b0,ahb_split})
A graphical example of an AHB design with n Masters, m Slaves and a Monitor is illustrated
on Figure 4-12 on page 141.
May 2005
140
An example code listing is provided below. The listing shows an example of instance
declaration in the testbench for a Master (number i), a Slave (number j) and the Monitor
corresponding to the bus connection of Figure 4-12 on page 141. All the signal names are
detailed on this figure and the following declarations are the connections of the pin-level
interfaces for the three transactors.
// Instance of the AHB Master number i
ahb_master_t ahb_master_i_instance (
.ahb_clk(HCLK),
.ahb_resetn(HRESETn),
.ahb_gnt(HGRANTi),
.ahb_lock(HLOCKi),
May 2005
141
142
143
Due to the pipelined structure of the AMBA AHB bus, two bursts can overlap each other,
which means that the first address phase of a new burst can start when the last data phase
of the previous burst is not yet complete. Therefore, two streams are needed to record
overlapping bursts. This is illustrated on Figure 4-14 on page 145 where a new
top_level_burst_stream_1 is automatically created and displayed in Simvision.
May 2005
144
The list of attributes recorded for each burst transaction, is detailed in Table 4-24 on
page 145.
Table 4-24 Table of Attributes Recorded for Each Burst Transaction
Attribute
Value Range
Radix
Description
Granted
Master ID
0 - 15
dec
May 2005
145
Attribute
Value Range
Radix
Description
Burst Start
Address
0x0 0xffffffff
hex
Burst Type
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha
Transfer Size
alpha
R/W
READ, WRITE
alpha
Transfer
Protection
opcode, data
alpha
/
user access,
privileged access
/
not bufferable,
bufferable
/
not cacheable,
cacheable
Number of
Beat Done
0 - 1024
decimal
Number of
Beat Expected
0 - 1024
decimal
May 2005
146
May 2005
147
Attribute
Value Range
Radix
Description
Beat Address
0x0 0xffffffff
hex
Transfer Type
NONSEQ, SEQ,
BUSY
alpha
Burst Type
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha
Transfer Size
alpha
R/W
READ, WRITE
alpha
Transfer
Sequence
LOCKED,
UNLOCKED
alpha
May 2005
148
Several attributes are recorded for each burst on this data_phase_stream. They are
detailed in Table 4-26 on page 150.
May 2005
149
Attribute
Value Range
Radix
Description
Beat Address
0x0 0xffffffff
hex
Beat Data
0x0 0xffffffff
hex
SINGLE, INCR,
WRAP4, INCR4,
WRAP8, INCR8,
WRAP16, INCR16
alpha
Transfer Size
alpha
R/W
READ, WRITE
alpha
Transfer
Sequence
LOCKED,
UNLOCKED
alpha
150
The description message associated with an AMBA compliance error is also logged in the
tb.log file. An example of error transaction description is shown in Figure 4-18 on
page 152.
May 2005
151
Compliance Checks
The AHB Monitor performs a number of compliance checks, related to the AHB Master and
AHB Slave protocol. These compliance checks are listed in Table 4-27 on page 152.
Table 4-27 Table of Compliance Checks
Condition for an
Error
check_htrans_idle_during_
reset
check_address_not_aligned
_to_transfer_size
ADDRESS ERROR:
Invalid Address Offset - Not
aligned to Transfer Size.
check_page_address_violat
ion
PAGE ADDRESS
VIOLATION ERROR: 1K
page crossover. Address
stepped over 1K boundary.
May 2005
152
Error Message
Condition for an
Error
Error Message
ADDRESS STEPPING
ERROR: Wrong stepping
on this beat.
or
ADDRESS STEPPING
AFTER BUSY ERROR:
Wrong stepping on this
beat.
check_burst_longer_than_h
burst
BURST LENGTH
ERROR: Burst longer than
specified by HBURST.
check_premature_end_of_no
n_incr_normal_burst
check_htrans_not_idle_aft
er_non_okay_response
ILLEGAL HTRANS
ERROR: HTRANS not set
to IDLE - RETRY or SPLIT
HRESP must cause
HTRANS to sequence to
IDLE.
check_htrans_goes_from_id
le_to_seq_busy
HTRANS transitions
from IDLE to SEQ or
BUSY.
ILLEGAL HTRANS
ERROR: Transition from
IDLE to NON NON-SEQ
state.
check_hsize_changes_durin
g_burst
check_hburst_changes_duri
ng_burst
HBURST doesnt
remain constant
during the entire burst
transaction.
ILLEGAL HBURST
ERROR: HBURST is not
stable for burst duration.
May 2005
153
Condition for an
Error
HREADY not correct
during the 2 cycle
non-OKAY response.
or
non-OKAY response is
not the same for both
cycles.
or
non-OKAY response is
not maintained for 2
cycles by the Slave.
or
Slave doesnt give an
OKAY response after
a two cycle RETRY or
a two cycle SPLIT.
Error Message
ILLEGAL NON OKAY
RESPONSE ERROR:
HREADY must be LOW on
a NON-OKAY response first
Cycle.
or
ILLEGAL NON OKAY
RESPONSE ERROR:
HREADY must be HIGH on
a NON-OKAY response
second Cycle.
or
ILLEGAL NON OKAY
RESPONSE ERROR:
Response not driven to
same NON-OKAY response
for two cycles.
or
ILLEGAL NON OKAY
RESPONSE ERROR: 1st
Cycle of response is
NON-OKAY and second
Cycle is OKAY.
or
ILLEGAL NON OKAY
RESPONSE ERROR:
Slave must give an OKAY
response after two RETRY
or two SPLIT Cycles.
May 2005
154
A few more details can be added to the message in the log file depending on which
compliance error is detected. For example, in case of a wrong address stepping, the
following message is printed in the log file:
*** SCV_WARNING: AMBA COMPLIANCE VIOLATION : ADDRESS STEPPING ERROR at time
1330 ns in process topTestCC$ahbMonitor.do_observe_bus
Wrong Stepping on this Beat
--->
Expected Address = 0x0000003fd
--->
Actual Address
= 0x0000003fe
The complete list of compliance errors detected by the monitor during a simulation is printed
in the log file, whereas only the first detected error for each cycle can be read in simvision.
If the compliance check parameter has been set to ERROR_EXPECTED (see Table 4-19 on
page 131) then only an SCV_INFO is issued by the Monitor Transactor instead of an
SCV_WARNING.
May 2005
155
May 2005
156
A
Appendix A - References
You can obtain any of the documents listed in Table A-1 on page 157 in the CDSDoc on-ine
documentatuin system, at the URL given in the table, or by contacting the Cadence
Verification Platforms Group Program Office. To contact the Platforms Group, send an e-mail
to avs@cadence.com or contact your sales representative.
Table A-1 Table of Cadence Documents
Document
URL Address
www.testbuilder.net
www.testbuilder.net
www.cadence.com
www.cadence.com
You can obtain the AMBA standard specifications at the URL listed in Table A-2 on page 157.
Table A-2 AMBA Specification Resource
Document
AMBA 2.0 Specifications
May 2005
URL Address
www.arm.com
157
May 2005
158
Index
Numerics
1KB
BurstType 146
BUSY 121
129
May 2005
C++ 138
compliance check 32
compliance checks 152
D
Delay 126
DUV 138
E
ERROR 122, 126, 129
F
fiber 145
flexibility Interface 40
H
HADDR 121, 139, 153
HBURST 121, 129, 139
HBUSREQx 138
HDL 38, 39, 138
HGRANTx 138
HLOCKx 138
HPROT 121, 139
HRDATA 121, 138
HREADY 122, 138
HRESP 122, 138
HSELx 121
HSIZE 121, 129, 139
HTRANS 121, 139
HWDATA 121, 139
HWRITE 121, 139
159
StartAddress 146
T
task level Interface 40
tools./vrm/examples/vrmamba/
run_ahb_demo 38, 39
TransferSize 146
TVM 31
TVM Interfaces 40
M
Master 121
Master TVM 31, 38
Monitor TVM 31, 129
Multi-Master 37
Multi-Master DUV Verification 38
Multi-Slave DUV Verification 39
V
vrmAhbMonitorT 128
W
WRAP16 146, 148, 150
WRAP4 146, 148, 150
WRAP8 146, 148, 150
WRITE 146, 148, 150
WriteData 126
N
netlist 38
NONSEQUENTIAL 121
O
OKAY
122
P
Pin Level Interface 120, 138
R
READ 146, 148, 150
ReadData 126
Response 126
RETRY 122, 126, 129
S
SEQUENTIAL 121
SINGLE 146, 148, 150
Single-Master 37
Single-Master Verification 38
Single-Slave 37
Single-Slave Verification 38
Slave 121, 126, 139
Slave TVM 31
SPLIT 122, 126, 129
May 2005
160
Glossary
DUV
A Device Under Verification (DUV) is the design targeted for verification.
Pull Interface
The most efficient way for a transactor to communicate other verification components is
through callback functions. This method is called Pull since it allows the transactor to pull
data from another component. A transactor with a Pull (or callback) interface is able to
transfer the flow of program control to another verification component without the need
to create a new thread or incur the overhead of a thread context switch. Another benefit
to the Pull approach is data exchange with the transactor occurs as close to the time the
data is used as possible. A minimum amount of data queuing or perhaps none at all is
required. This makes it possible to build highly reactive test benches.
Push Interface
A Push transactor interface is where the component communicating with the transactor
calls a method to push data into the transactor, rather than having the transactor pull the
data out of the communicating component. It is possible to build a Push interface on top
of the standard Pull interface by inserting a FIFO queue between the stimulus generator
and the master transactors callback methods.The Push interface can be added to a
transactor, usually a master, when the transactor user wants their program to follow a
sequential pattern (for example, first do this, then do this, and this, and so on.).
Master Transactor
Connects a verification test program with a signal-level interface, which is part of a device
under verification (DUV). The master transactor takes a command or a data structure
from a stimulus generator and converts this information (known as a transaction) into the
signal-level protocol of the interface.
Monitor Transactor
Connects to a DUV interface and recognizes transactions. Unlike a slave transactor, a
monitor transactor only reports what it sees to a higher level verification component
(such as a response monitor or protocol checker).
May 2005
161
May 2005
162
May 2005
163
May 2005
164