Shmem_chk_ok function, Bfm log and message procedures, Bfm log and message procedures -34 – Altera Arria 10 Avalon-MM User Manual

Page 184

Advertising
background image

Related Information

Shared Memory Constants

on page 14-31

shmem_chk_ok Function

The

shmem_chk_ok

function checks a block of BFM shared memory against a specified data pattern.

Location

altpcietb_bfm_shmem.v

Syntax

result:= shmem_chk_ok(addr, mode, leng, init, display_error)

Arguments

addr

BFM shared memory starting address for checking data.

mode

Data pattern used for checking the data. Should be one of the

constants defined in section “Shared Memory Constants” on

page 18–35.

leng

Length, in bytes, of data to check.

init

This argument is

reg [63:0]

.The necessary least significant

bits are used for the data patterns that are smaller than 64-bits.

display_error

When set to 1, this argument displays the mis-comparing data

on the simulator standard output.

Return

Result

Result is 1-bit.
• 1’b1 — Data patterns compared successfully

• 1’b0 — Data patterns did not compare successfully

BFM Log and Message Procedures

The following procedures and functions are available in the Verilog HDL include file

altpcietb_bfm_driver_rp.v.
These procedures provide support for displaying messages in a common format, suppressing informa‐

tional messages, and stopping simulation on specific message types.
The following constants define the type of message and their values determine whether a message is

displayed or simulation is stopped after a specific message. Each displayed message has a specific prefix,

based on the message type in the following table.
You can suppress the display of certain message types. The default values determining whether a message

type is displayed are defined in the following table. To change the default message display, modify the

display default value with a procedure call to

ebfm_log_set_suppressed_msg_mask

.

Certain message types also stop simulation after the message is displayed. The following table shows the

default value determining whether a message type stops simulation. You can specify whether simulation

stops for particular messages with the procedure

ebfm_log_set_stop_on_msg_mask

.

All of these log message constants type

integer

.

14-34

shmem_chk_ok Function

UG-01145_avmm

2015.05.14

Altera Corporation

Avalon-MM Testbench and Design Example

Send Feedback

Advertising