Hardware Reference
In-Depth Information
int severity_level = 'OVL_SEVERITY_DEFAULT,
int min_ack_cycle = 0,
int max_ack_cycle = 0,
int req_drop = 0, // these three arguments
int deassert_count = 0, // may not be needed
int max_ack_length = 0, // since req is a sequence
int property_type = 'OVL_PROPERTY_DEFAULT,
string msg = 'OVL_MSG_DEFAULT,
int coverage_level = 'OVL_COVER_DEFAULT,
int synthesis = 'SYNTHESIS,
output ['OVL_FIRE_WIDTH-1:0]
fire
);
//...
generate // elaboration-time constant checks at compile time
if (min_ack_cycle < 0)
$error("min_ack_cycle is negative");
if (max_ack_cycle < min_ack_cycle) $error(
"max_ack_cycle is less than min_ack_cycle");
if (req_drop < 0 || req_drop > 1) $warning(
"req_drop \%0d is not 0 or 1",
req_drop, "positive assumed 1,"
"anything less than 1 assumed 0");
// ... checks for other arguments ...
endgenerate
default clocking checker_clk @clk; endclocking
default disable iff (reset);
assign fire = {'OVL_FIRE_WIDTH{1'b0}}; // Tied low in V2.3
//... Body of the checker ...
t
endchecker : assert_handshake
The parameters from the original checker became regular arguments of the
checker -based checker. It simplifies instantiation, although the user should be
aware that these arguments must be elaboration-time constants. The argument values
of constants are verified at elaboration time using a conditional generate and
elaboration time error tasks. If the values are illegal, then an error message is issued,
or if a reasonable alternative exists, then that value is used and a warning is issued.
The following parameters from the original checker are missing:
parameter clock_edge ='OVL_CLOCK_EDGE_DEFAULT;
parameter reset_polarity = 'OVL_RESET_POLARITY_DEFAULT;
parameter gating_type = 'OVL_GATING_TYPE_DEFAULT;
This is because
￿ clock_edge is not needed as the argument clk can be an event expression.
￿ reset_polarity is not needed because we can pass any expression to the
checker and it can infer the appropriate default expression from the contextual
default disable iff declaration.
Search WWH ::




Custom Search