Shmem_chk_ok function, Bfm log and message procedures – Altera Arria V Avalon-ST User Manual
Page 213
Related Information
on page 16-40
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
.
2014.12.15
shmem_chk_ok Function
16-43
Testbench and Design Example
Altera Corporation