Package: TbUtilPkg

Constants

Name Type Value Description
CLK_ACTIVE std_logic '1'
t_sim_resolution time std.env.resolution_limit VHDL-2008

Functions

Description

constant t_sim_resolution : time := 1 ns ; -- for non VHDL-2008 simulators

ZeroOneHot, OneHot
OneHot: return true if exactly one value is 1

ZeroOneHot: return false when more than one value is a 1

Description

IfElse
Crutch until VHDL-2019 conditional initialization

If condition is true return first parameter otherwise return second

Description

RequestTransaction - WaitForTransaction
RequestTransaction - Transaction initiation in transaction procedure

WaitForTransaction - Transaction execution control in VC


RequestTransaction - WaitForTransaction

std_logic

Description

RequestTransaction - WaitForTransaction

bit

Description

WaitForTransaction
Specializations for interrupt handling

Currently only std_logic based

Description
Variation for model that stops waiting when IntReq is asserted
Intended for models that need to switch between instruction streams
such as a CPU when interrupt is pending

Description
Set Ack to Model starting value

Description
Set Ack to Model finishing value

Description
If a transaction is pending, return true

Description
Variation for clockless models

Description

Toggle, WaitForToggle

Used for communicating between processes

Description
Bit type versions

Description
Integer type versions

Description

WaitForBarrier
Barrier Synchronization

Multiple processes call it, it finishes when all have called it

Description
resolved_barrier : summing resolution used in conjunction with integer based barriers

Description
Usage of integer barriers requires resolved_barrier. Initialization to 1 recommended, but not required
signal barrier1 : resolved_barrier integer := 1 ; -- using the resolution function
signal barrier2 : integer_barrier := 1 ; -- using the subtype that already applies the resolution function

Description
Using separate signals

Description

WaitForClock

Sync to Clock - after a delay, after a number of clocks

Description

WaitForLevel

Find a signal at a level

Description

CreateClock, CreateReset

Note these do not exit

Description

Deprecated
WaitForAck, StrobeAck

Replaced by WaitForToggle and Toggle