Package: physical
- File: physical.vhdl
Constants
Name | Type | Value | Description |
---|---|---|---|
C_PHYSICAL_REPORT_TIMING_DEVIATION | boolean | TRUE | if true: TimingToCycles reports difference between expected and actual result |
Types
Name | Type | Description |
---|---|---|
FREQ | ||
BAUD | ||
MEMORY | ||
T_TIMEVEC | array(natural range <>) of time | vector data types |
T_FREQVEC | array(natural range <>) of FREQ | |
T_BAUDVEC | array(natural range <>) of BAUD | |
T_MEMVEC | array(natural range <>) of MEMORY |
Functions
- to_time (f : FREQ) return time
Description
conversion functions
- to_freq (p : time) return FREQ
- to_freq (br : BAUD) return FREQ
- to_baud (str : string) return BAUD
- div (a : time;
b : time) return real
Description
inter-type arithmetic
- div (a : FREQ;
b : FREQ) return real
- ite (cond : boolean;
value1 : time;
value2 : time) return time
Description
if-then-else
- ite (cond : boolean;
value1 : FREQ;
value2 : FREQ) return FREQ
- ite (cond : boolean;
value1 : BAUD;
value2 : BAUD) return BAUD
- ite (cond : boolean;
value1 : MEMORY;
value2 : MEMORY) return MEMORY
- tmin (arg1 : time;
arg2 : time) return time
Description
Calculates: min(arg1, arg2) for times
- fmin (arg1 : FREQ;
arg2 : FREQ) return FREQ
Description
Calculates: min(arg1, arg2) for frequencies
- bmin (arg1 : BAUD;
arg2 : BAUD) return BAUD
Description
Calculates: min(arg1, arg2) for symbols per second
- mmin (arg1 : MEMORY;
arg2 : MEMORY) return MEMORY
Description
Calculates: min(arg1, arg2) for memory
- tmax (arg1 : time;
arg2 : time) return time
Description
Calculates: max(arg1, arg2) for times
- fmax (arg1 : FREQ;
arg2 : FREQ) return FREQ
Description
Calculates: max(arg1, arg2) for frequencies
- bmax (arg1 : BAUD;
arg2 : BAUD) return BAUD
Description
Calculates: max(arg1, arg2) for symbols per second
- mmax (arg1 : MEMORY;
arg2 : MEMORY) return MEMORY
Description
Calculates: max(arg1, arg2) for memory
- tmin (vec : T_TIMEVEC) return time
Description
Calculates: min(vec) for a time vector
- fmin (vec : T_FREQVEC) return FREQ
Description
Calculates: min(vec) for a frequency vector
- bmin (vec : T_BAUDVEC) return BAUD
Description
Calculates: min(vec) for a baud vector
- mmin (vec : T_MEMVEC) return MEMORY
Description
Calculates: min(vec) for a memory vector
- tmax (vec : T_TIMEVEC) return time
Description
Calculates: max(vec) for a time vector
- fmax (vec : T_FREQVEC) return FREQ
Description
Calculates: max(vec) for a frequency vector
- bmax (vec : T_BAUDVEC) return BAUD
Description
Calculates: max(vec) for a baud vector
- mmax (vec : T_MEMVEC) return MEMORY
Description
Calculates: max(vec) for a memory vector
- tsum (vec : T_TIMEVEC) return time
Description
Calculates: sum(vec) for a time vector
- fsum (vec : T_FREQVEC) return FREQ
Description
Calculates: sum(vec) for a frequency vector
- bsum (vec : T_BAUDVEC) return BAUD
Description
Calculates: sum(vec) for a baud vector
- msum (vec : T_MEMVEC) return MEMORY
Description
Calculates: sum(vec) for a memory vector
- fs2Time (t_fs : integer) return time
Description
convert standard types (NATURAL, REAL) to time (TIME)
- ps2Time (t_ps : integer) return time
- ns2Time (t_ns : integer) return time
- us2Time (t_us : integer) return time
- ms2Time (t_ms : integer) return time
- sec2Time (t_sec : integer) return time
- fs2Time (t_fs : REAL) return time
- ps2Time (t_ps : REAL) return time
- ns2Time (t_ns : REAL) return time
- us2Time (t_us : REAL) return time
- ms2Time (t_ms : REAL) return time
- sec2Time (t_sec : REAL) return time
- Hz2Time (f_Hz : natural) return time
Description
convert standard types (NATURAL, REAL) to period (TIME)
- kHz2Time (f_kHz : natural) return time
- MHz2Time (f_MHz : natural) return time
- GHz2Time (f_GHz : natural) return time
- Hz2Time (f_Hz : REAL) return time
- kHz2Time (f_kHz : REAL) return time
- MHz2Time (f_MHz : REAL) return time
- GHz2Time (f_GHz : REAL) return time
- Hz2Freq (f_Hz : natural) return FREQ
Description
convert standard types (NATURAL, REAL) to frequency (FREQ)
- kHz2Freq (f_kHz : natural) return FREQ
- MHz2Freq (f_MHz : natural) return FREQ
- GHz2Freq (f_GHz : natural) return FREQ
- Hz2Freq (f_Hz : REAL) return FREQ
- kHz2Freq (f_kHz : REAL) return FREQ
- MHz2Freq (f_MHz : REAL) return FREQ
- GHz2Freq (f_GHz : REAL) return FREQ
- to_real (t : time;
scale : time) return REAL
Description
convert physical types to standard type (REAL)
- to_real (f : FREQ;
scale : FREQ) return REAL
- to_real (br : BAUD;
scale : BAUD) return REAL
- to_real (mem : MEMORY;
scale : MEMORY) return REAL
- to_int (t : time;
scale : time;
RoundingStyle : T_ROUNDING_STYLE := ROUND_TO_NEAREST) return integer
Description
convert physical types to standard type (INTEGER)
- to_int (f : FREQ;
scale : FREQ;
RoundingStyle : T_ROUNDING_STYLE := ROUND_TO_NEAREST) return integer
- to_int (br : BAUD;
scale : BAUD;
RoundingStyle : T_ROUNDING_STYLE := ROUND_TO_NEAREST) return integer
- to_int (mem : MEMORY;
scale : MEMORY;
RoundingStyle : T_ROUNDING_STYLE := ROUND_UP) return integer
- TimingToCycles (Timing : time;
Clock_Period : time;
RoundingStyle : T_ROUNDING_STYLE := ROUND_UP) return natural
Description
calculate needed counter cycles to achieve a given 1. timing/delay and 2. frequency/period
- TimingToCycles (Timing : time;
Clock_Frequency : FREQ;
RoundingStyle : T_ROUNDING_STYLE := ROUND_UP) return natural
- CyclesToDelay (Cycles : natural;
Clock_Period : time) return time
- CyclesToDelay (Cycles : natural;
Clock_Frequency : FREQ) return time
- to_string (t : time;
precision : natural) return string
Description
convert and format physical types to STRING
- to_string (f : FREQ;
precision : natural) return string
- to_string (br : BAUD;
precision : natural) return string
- to_string (mem : MEMORY;
precision : natural) return string