SyoSil ApS UVM Scoreboard  1.0.3.0
Public Member Functions | Public Attributes | List of all members
pk_utils_uvm::filter_trfm< IN, OUT > Class Template Reference

Base class for a filter transformation. More...

+ Inheritance diagram for pk_utils_uvm::filter_trfm< IN, OUT >:

Public Member Functions

virtual void transform (IN t, output OUT items[])
 Transforms the item of type IN to one or more items of type OUT. More...
 
virtual bit evaluate (IN t)
 Evaluates whether the input should be transformed and forwarded, or whether it should be discarded. More...
 
void write (IN t)
 This filter transform's write-implementation from uvm_subscriber When items are written to the filter transform, they are first evaluated with evaluate to decide whether a transformation should occur. More...
 

Public Attributes

uvm_analysis_port< OUT > ap
 Analysis port where transformed items are output.
 

Detailed Description

template<typename IN = int, typename OUT = uvm_sequence_item>
class pk_utils_uvm::filter_trfm< IN, OUT >

Base class for a filter transformation.

If type IN is a subtype of uvm_sequence_item, this filter transforms simply performs an identity transform by upcasting the input item to a uvm_sequence_item If another transformation is desired, extend the class and override the evaluate and transform methods

Parameters
INInput type of objects to transform
OUTOutput type of transformed objects

Definition at line 18 of file pk_utils_uvm.sv.

Member Function Documentation

◆ evaluate()

template<typename IN = int, typename OUT = uvm_sequence_item>
virtual bit pk_utils_uvm::filter_trfm< IN, OUT >::evaluate ( IN  t)
virtual

Evaluates whether the input should be transformed and forwarded, or whether it should be discarded.

If the method returns 0, the input item is discarded and may not be retrievable

Returns
1 if the item should be transformed and forwarded, 0 otherwise.

Definition at line 49 of file pk_utils_uvm.sv.

◆ transform()

template<typename IN = int, typename OUT = uvm_sequence_item>
virtual void pk_utils_uvm::filter_trfm< IN, OUT >::transform ( IN  t,
output OUT  items[] 
)
virtual

Transforms the item of type IN to one or more items of type OUT.

Parameters
tThe input object which should be transformed
itemsA reference to an array where output items will be returned. If the handle is to an existing array, that array will be lost.

Definition at line 40 of file pk_utils_uvm.sv.

◆ write()

template<typename IN = int, typename OUT = uvm_sequence_item>
void pk_utils_uvm::filter_trfm< IN, OUT >::write ( IN  t)

This filter transform's write-implementation from uvm_subscriber When items are written to the filter transform, they are first evaluated with evaluate to decide whether a transformation should occur.

If true, they are transformed with transform, and all output items are then written out on ap

Parameters
tThe item written to this filter transform

Definition at line 58 of file pk_utils_uvm.sv.


The documentation for this class was generated from the following file:

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 SyoSil ApS
All Rights Reserved Worldwide

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:41:20
Find a documentation bug? Report bugs to: scoreboard@syosil.com