Subject: [sv-ec] Scope randomize "method" erratum
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Wed Feb 18 2004 - 14:01:04 PST
In sections 12.11 and 12.11.1, the scope randomize subroutine is referred to as a 'method'.
But, in actuality std::randomize() is a function, not a method.
A proposal to replace "scope randomize method" with "scope randomize function" follows below.
Arturo
--------------------------------------------------------------------------------
Change in Section 12.11
-- First, second, and third paragraphs (page 151)
-- Caption to Syntax Box 12-9 (page 151)
The built-in class randomize method operates exclusively on class member variables. Using classes to model the data to be randomized is a powerful mechanism that enables the creation of generic, reusable objects containing random variables and constraints that can be later extended, inherited, constrained, overridden, enabled, disabled, merged with or separated from other objects. The ease with which classes and their associated random variables and constraints can be manipulated make classes an ideal vehicle for describing and manipulating random data and constraints. However, some less-demanding problems that do not require the full flexibility of classes, can use a simpler mechanism to randomize data that does not belong to a class. The scope randomize method function, std::randomize(), enables users to randomize data in the current scope, without the need to define a class or instantiate a class object.
The syntax of the scope randomize method function is:
Syntax 12-9-scope randomize method function syntax (excerpt from Annex A)
The scope randomize method function behaves exactly the same as a class randomize method, except that it operates on the variables of the current scope instead of class member variables. Arguments to this method function specify the variables that are to be assigned random values, i.e., the random variables.
-- Last two paragraphs (page 152)
However, for this simple application, the scope randomize method function leads to a straightforward implementation.
The scope randomize method function returns 1 if it successfully sets all the random variables to valid values, otherwise it returns 0. If the scope randomize method function is called with no arguments then it behaves as a checker, and simply returns status.
In Section 12.11.1
-- First paragraph (page 152)
The std::randomize() with form of the scope randomize method function allows users to specify random constraints to be applied to the local scope variables. When specifying constraints, the arguments to the scope randomize method function become random variables, all other variables are considered state variables.
This archive was generated by hypermail 2b28 : Wed Feb 18 2004 - 14:09:37 PST