[source]

Package physical

For detailed documentation see below.

NAMING CONVENTION:

t - time p - period d - delay f - frequency br - baud rate vec - vector

ATTENTION:

This package is not supported by Xilinx Synthese Tools prior to 14.7!

It was successfully tested with:
  • Xilinx Synthesis Tool (XST) 14.7 and Xilinx ISE Simulator (iSim) 14.7

  • Quartus II 13.1

  • QuestaSim 10.0d

  • GHDL 0.31

Tool chains with known issues:
  • Xilinx Vivado Synthesis 2014.4

Untested tool chains
  • Xilinx Vivado Simulator (xSim) 2014.4

Constants

Name

Value

Description

C_PHYSICAL_REPORT_TIMING_DEVIATION

TRUE

if true: TimingToCycles reports difference between expected and actual result

Types

Name

Description

FREQ
BAUD
MEMORY
T_TIMEVEC

vector data types

T_FREQVEC
T_BAUDVEC
T_MEMVEC

Functions

virtual function time to_time ( FREQ f ) [source]

conversion functions

virtual function FREQ to_freq ( time p ) [source]
virtual function FREQ to_freq ( BAUD br ) [source]
virtual function BAUD to_baud ( string str ) [source]
virtual function real div ( time a, time b ) [source]

inter-type arithmetic

virtual function real div ( FREQ a, FREQ b ) [source]
virtual function FREQ "/" ( real x, time t ) [source]
virtual function time "/" ( real x, FREQ f ) [source]
virtual function real "*" ( time t, FREQ f ) [source]
virtual function real "*" ( FREQ f, time t ) [source]
virtual function time ite ( boolean cond, time value1, time value2 ) [source]

if-then-else

virtual function FREQ ite ( boolean cond, FREQ value1, FREQ value2 ) [source]
virtual function BAUD ite ( boolean cond, BAUD value1, BAUD value2 ) [source]
virtual function MEMORY ite ( boolean cond, MEMORY value1, MEMORY value2 ) [source]
virtual function time tmin ( time arg1, time arg2 ) [source]

min/ max for 2 arguments

virtual function time tmin ( T_TIMEVEC vec ) [source]

min/max/sum as vector aggregation Calculates: min(vec) for a time vector

virtual function FREQ fmin ( FREQ arg1, FREQ arg2 ) [source]
virtual function FREQ fmin ( T_FREQVEC vec ) [source]

Calculates: min(vec) for a frequency vector

virtual function BAUD bmin ( BAUD arg1, BAUD arg2 ) [source]
virtual function BAUD bmin ( T_BAUDVEC vec ) [source]

Calculates: min(vec) for a baud vector

virtual function MEMORY mmin ( MEMORY arg1, MEMORY arg2 ) [source]
virtual function MEMORY mmin ( T_MEMVEC vec ) [source]

Calculates: min(vec) for a memory vector

virtual function time tmax ( time arg1, time arg2 ) [source]
virtual function time tmax ( T_TIMEVEC vec ) [source]

Calculates: max(vec) for a time vector

virtual function FREQ fmax ( FREQ arg1, FREQ arg2 ) [source]
virtual function FREQ fmax ( T_FREQVEC vec ) [source]

Calculates: max(vec) for a frequency vector

virtual function BAUD bmax ( BAUD arg1, BAUD arg2 ) [source]
virtual function BAUD bmax ( T_BAUDVEC vec ) [source]

Calculates: max(vec) for a baud vector

virtual function MEMORY mmax ( MEMORY arg1, MEMORY arg2 ) [source]
virtual function MEMORY mmax ( T_MEMVEC vec ) [source]

Calculates: max(vec) for a memory vector

virtual function time tsum ( T_TIMEVEC vec ) [source]

Calculates: sum(vec) for a time vector

virtual function FREQ fsum ( T_FREQVEC vec ) [source]

Calculates: sum(vec) for a frequency vector

virtual function BAUD bsum ( T_BAUDVEC vec ) [source]

Calculates: sum(vec) for a baud vector

virtual function MEMORY msum ( T_MEMVEC vec ) [source]

Calculates: sum(vec) for a memory vector

virtual function time fs2Time ( integer t_fs ) [source]

convert standard types (NATURAL, REAL) to time (TIME)

virtual function time fs2Time ( REAL t_fs ) [source]
virtual function time ps2Time ( integer t_ps ) [source]
virtual function time ps2Time ( REAL t_ps ) [source]
virtual function time ns2Time ( integer t_ns ) [source]
virtual function time ns2Time ( REAL t_ns ) [source]
virtual function time us2Time ( integer t_us ) [source]
virtual function time us2Time ( REAL t_us ) [source]
virtual function time ms2Time ( integer t_ms ) [source]
virtual function time ms2Time ( REAL t_ms ) [source]
virtual function time sec2Time ( integer t_sec ) [source]
virtual function time sec2Time ( REAL t_sec ) [source]
virtual function time Hz2Time ( natural f_Hz ) [source]

convert standard types (NATURAL, REAL) to period (TIME)

virtual function time Hz2Time ( REAL f_Hz ) [source]
virtual function time kHz2Time ( natural f_kHz ) [source]
virtual function time kHz2Time ( REAL f_kHz ) [source]
virtual function time MHz2Time ( natural f_MHz ) [source]
virtual function time MHz2Time ( REAL f_MHz ) [source]
virtual function time GHz2Time ( natural f_GHz ) [source]
virtual function time GHz2Time ( REAL f_GHz ) [source]
virtual function FREQ Hz2Freq ( natural f_Hz ) [source]

convert standard types (NATURAL, REAL) to frequency (FREQ)

virtual function FREQ Hz2Freq ( REAL f_Hz ) [source]
virtual function FREQ kHz2Freq ( natural f_kHz ) [source]
virtual function FREQ kHz2Freq ( REAL f_kHz ) [source]
virtual function FREQ MHz2Freq ( natural f_MHz ) [source]
virtual function FREQ MHz2Freq ( REAL f_MHz ) [source]
virtual function FREQ GHz2Freq ( natural f_GHz ) [source]
virtual function FREQ GHz2Freq ( REAL f_GHz ) [source]
virtual function real to_real ( time t, time scale ) [source]

convert physical types to standard type (REAL)

virtual function real to_real ( FREQ f, FREQ scale ) [source]
virtual function real to_real ( BAUD br, BAUD scale ) [source]
virtual function real to_real ( MEMORY mem, MEMORY scale ) [source]
virtual function integer to_int ( time t, time scale, T_ROUNDING_STYLE RoundingStyle ) [source]

convert physical types to standard type (INTEGER)

virtual function integer to_int ( FREQ f, FREQ scale, T_ROUNDING_STYLE RoundingStyle ) [source]
virtual function integer to_int ( BAUD br, BAUD scale, T_ROUNDING_STYLE RoundingStyle ) [source]
virtual function integer to_int ( MEMORY mem, MEMORY scale, T_ROUNDING_STYLE RoundingStyle ) [source]
virtual function natural TimingToCycles ( time Timing, time Clock_Period, T_ROUNDING_STYLE RoundingStyle ) [source]

calculate needed counter cycles to achieve a given 1. timing/delay and 2. frequency/period

virtual function natural TimingToCycles ( time Timing, FREQ Clock_Frequency, T_ROUNDING_STYLE RoundingStyle ) [source]
virtual function time CyclesToDelay ( natural Cycles, time Clock_Period ) [source]
virtual function time CyclesToDelay ( natural Cycles, FREQ Clock_Frequency ) [source]
virtual function string to_string ( time t, natural precision ) [source]

convert and format physical types to STRING

virtual function string to_string ( FREQ f, natural precision ) [source]
virtual function string to_string ( BAUD br, natural precision ) [source]
virtual function string to_string ( MEMORY mem, natural precision ) [source]