UG-20225 | 2021.03.31
Constant(MessageType)
Description
Mask Bit
No4
Displayby DefaultYes
SimulationStops byDefaultNo
MessagePrefix
EBFM_MSG_ERROR_CONTINUE
EBFM_MSG_ERROR_FATAL
Specifies a recoverable error thatallows simulation to continue. Usethis error for data comparisonfailures.
Specifies an error that stops
simulation because the error leavesthe testbench in a state wherefurther simulation is not possible.Used for BFM test driver or RootPort BFM fatal errors. Specifies anerror that stops simulation becausethe error leaves the testbench in astate where further simulation isnot possible. Use this error
message for errors that occur dueto a problem in the BFM test drivermodule or the Root Port BFM, thatare not caused by the EndpointApplication Layer being tested.
ERROR:
N/A
YesCannotsuppressY
Cannotsuppress
Yes
Cannot suppress
FATAL:
EBFM_MSG_ERROR_FATAL_TB_ERR
N/A
Y
Cannot suppress
FATAL:
6.4.11.1. ebfm_display Verilog HDL Function
The ebfm_display procedure or function displays a message of the specified type tothe simulation standard output and also the log file if ebfm_log_open is called.A message can be suppressed, simulation can be stopped or both based on the defaultsettings of the message type and the value of the bit mask when each of the
procedures listed below is called. You can call one or both of these procedures basedon what messages you want displayed and whether or not you want simulation to stopfor specific messages.••
LocationSyntaxArgument
When ebfm_log_set_suppressed_msg_mask is called, the display of themessage might be suppressed based on the value of the bit mask.
When ebfm_log_set_stop_on_msg_mask is called, the simulation can bestopped after the message is displayed, based on the value of the bit mask.
Verilog HDL: dummy_return:=ebfm_display(msg_type, message);msg_typemessage
Message type for the message. Should be one of the constants definedin Table 106 on page 144.
The message string is limited to a maximum of 100 characters. Also,because Verilog HDL does not allow variable length strings, this routinestrips off leading characters of 8’h00 before displaying the message.Applies only to the Verilog HDL routine.
Returnalways 0
6.4.11.2. ebfm_log_stop_sim Verilog HDL Function
The ebfm_log_stop_sim procedure stops the simulation.
Send Feedback
6.Testbench
UG-20225 | 2021.03.31
LocationSyntaxArgument
Verilog HDL: return:=ebfm_log_stop_sim(success);
success
When set to a 1, this process stops the simulation with a messageindicating successful completion. The message is prefixed withSUCCESS.
Otherwise, this process stops the simulation with a message indicatingunsuccessful completion. The message is prefixed with FAILURE.
ReturnAlways 0This value applies only to the Verilog HDL function.
6.4.11.3. ebfm_log_set_suppressed_msg_mask Task
The ebfm_log_set_suppressed_msg_mask procedure controls which messagetypes are suppressed.
LocationSyntaxArgument
ebfm_log_set_suppressed_msg_mask (msg_mask)msg_mask
This argument is reg [EBFM_MSG_ERROR_CONTINUE:EBFM_MSG_DEBUG].
A 1 in a specific bit position of the msg_mask causes messages of thetype corresponding to the bit position to be suppressed.
6.4.11.4. ebfm_log_set_stop_on_msg_mask Verilog HDL Task
The ebfm_log_set_stop_on_msg_mask procedure controls which message typesstop simulation. This procedure alters the default behavior of the simulation whenerrors occur as described in the BFM Log and Message Procedures.
LocationSyntaxArgument
ebfm_log_set_stop_on_msg_mask (msg_mask)msg_mask
This argument is reg
[EBFM_MSG_ERROR_CONTINUE:EBFM_MSG_DEBUG].
A 1 in a specific bit position of the msg_mask causes messages of the
type corresponding to the bit position to stop the simulation after themessage is displayed.
6.4.11.5. ebfm_log_open Verilog HDL Function
The ebfm_log_open procedure opens a log file of the specified name. All displayedmessages are called by ebfm_display and are written to this log file as simulatorstandard output.
LocationSyntaxArgument
ebfm_log_open (fn)fn
This argument is type string and provides the file name of log file tobe opened.
6.4.11.6. ebfm_log_close Verilog HDL Function
The ebfm_log_close procedure closes the log file opened by a previous call toebfm_log_open.
Send Feedback
6.Testbench
UG-20225 | 2021.03.31
Location
SyntaxArgument
ebfm_log_close
NONE
6.4.12. Verilog HDL Formatting Functions
6.4.12.1. himage1
This function creates a one-digit hexadecimal string representation of the inputargument that can be concatenated into a larger message string and passed toebfm_display.
LocationSyntaxArgumentReturn range
string:= himage(vec)vecstring
Input data type reg with a range of 3:0.
Returns a 1-digit hexadecimal representation of the input argument.Return data is type reg with a range of 8:1
6.4.12.2. himage2
This function creates a two-digit hexadecimal string representation of the inputargument that can be concatenated into a larger message string and passed toebfm_display.
LocationSyntax
Argument rangeReturn range
string:= himage(vec)vecstring
Input data type reg with a range of 7:0.
Returns a 2-digit hexadecimal presentation of the input argument,
padded with leading 0s, if they are needed. Return data is type reg witha range of 16:1
6.4.12.3. himage4
This function creates a four-digit hexadecimal string representation of the inputargument can be concatenated into a larger message string and passed toebfm_display.
LocationSyntax
Argument rangeReturn range
string:= himage(vec)vec
Input data type reg with a range of 15:0.
Returns a four-digit hexadecimal representation of the input argument, padded with leading 0s, if theyare needed. Return data is type reg with a range of 32:1.
6.4.12.4. himage8
This function creates an 8-digit hexadecimal string representation of the inputargument that can be concatenated into a larger message string and passed toebfm_display.
Send Feedback
因篇幅问题不能全部显示,请点此查看更多更全内容