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
Name |
Value |
Description |
---|---|---|
C_PHYSICAL_REPORT_TIMING_DEVIATION |
TRUE |
if true: TimingToCycles reports difference between expected and actual result |
Name |
Description |
---|---|
FREQ |
|
BAUD |
|
MEMORY |
|
T_TIMEVEC |
vector data types |
T_FREQVEC |
|
T_BAUDVEC |
|
T_MEMVEC |
Functions
- to_time(FREQ f)
conversion functions
- Parameters:
f (FREQ)
- to_freq(time p)
- Parameters:
p (time)
- Return type:
- to_baud(string str)
- Parameters:
str (string)
- Return type:
- div(time a, time b)
inter-type arithmetic
- Parameters:
a (time)
b (time)
- "/"(real x, time t)
- Parameters:
x (real)
t (time)
- Return type:
- "/"(real x, FREQ f)
- Parameters:
x (real)
f (FREQ)
- "*"(time t, FREQ f)
- Parameters:
t (time)
f (FREQ)
- "*"(FREQ f, time t)
- Parameters:
f (FREQ)
t (time)
- ite(boolean cond, time value1, time value2)
if-then-else
- Parameters:
cond (boolean)
value1 (time)
value2 (time)
- tmin(time arg1, time arg2)
min/ max for 2 arguments
- Parameters:
arg1 (time)
arg2 (time) -- Calculates: min(arg1, arg2) for times
- tmin(T_TIMEVEC vec)
min/max/sum as vector aggregation Calculates: min(vec) for a time vector
- Parameters:
vec (T_TIMEVEC)
- tmax(time arg1, time arg2)
- Parameters:
arg1 (time)
arg2 (time) -- Calculates: max(arg1, arg2) for times
- tmax(T_TIMEVEC vec)
Calculates: max(vec) for a time vector
- Parameters:
vec (T_TIMEVEC)
- tsum(T_TIMEVEC vec)
Calculates: sum(vec) for a time vector
- Parameters:
vec (T_TIMEVEC)
- fs2Time(integer t_fs)
convert standard types (NATURAL, REAL) to time (TIME)
- Parameters:
t_fs (integer)
- fs2Time(REAL t_fs)
- Parameters:
t_fs (REAL)
- ps2Time(integer t_ps)
- Parameters:
t_ps (integer)
- ps2Time(REAL t_ps)
- Parameters:
t_ps (REAL)
- ns2Time(integer t_ns)
- Parameters:
t_ns (integer)
- ns2Time(REAL t_ns)
- Parameters:
t_ns (REAL)
- us2Time(integer t_us)
- Parameters:
t_us (integer)
- us2Time(REAL t_us)
- Parameters:
t_us (REAL)
- ms2Time(integer t_ms)
- Parameters:
t_ms (integer)
- ms2Time(REAL t_ms)
- Parameters:
t_ms (REAL)
- sec2Time(integer t_sec)
- Parameters:
t_sec (integer)
- sec2Time(REAL t_sec)
- Parameters:
t_sec (REAL)
- Hz2Time(natural f_Hz)
convert standard types (NATURAL, REAL) to period (TIME)
- Parameters:
f_Hz (natural)
- Hz2Time(REAL f_Hz)
- Parameters:
f_Hz (REAL)
- kHz2Time(natural f_kHz)
- Parameters:
f_kHz (natural)
- kHz2Time(REAL f_kHz)
- Parameters:
f_kHz (REAL)
- MHz2Time(natural f_MHz)
- Parameters:
f_MHz (natural)
- MHz2Time(REAL f_MHz)
- Parameters:
f_MHz (REAL)
- GHz2Time(natural f_GHz)
- Parameters:
f_GHz (natural)
- GHz2Time(REAL f_GHz)
- Parameters:
f_GHz (REAL)
- Hz2Freq(natural f_Hz)
convert standard types (NATURAL, REAL) to frequency (FREQ)
- Parameters:
f_Hz (natural)
- Return type:
- Hz2Freq(REAL f_Hz)
- Parameters:
f_Hz (REAL)
- Return type:
- kHz2Freq(natural f_kHz)
- Parameters:
f_kHz (natural)
- Return type:
- kHz2Freq(REAL f_kHz)
- Parameters:
f_kHz (REAL)
- Return type:
- MHz2Freq(natural f_MHz)
- Parameters:
f_MHz (natural)
- Return type:
- MHz2Freq(REAL f_MHz)
- Parameters:
f_MHz (REAL)
- Return type:
- GHz2Freq(natural f_GHz)
- Parameters:
f_GHz (natural)
- Return type:
- GHz2Freq(REAL f_GHz)
- Parameters:
f_GHz (REAL)
- Return type:
- to_real(time t, time scale)
convert physical types to standard type (REAL)
- Parameters:
t (time)
scale (time)
- to_int(time t, time scale, T_ROUNDING_STYLE RoundingStyle = ROUND\_TO\_NEAREST)
convert physical types to standard type (INTEGER)
- Parameters:
t (time)
scale (time)
RoundingStyle (T_ROUNDING_STYLE)
- to_int(FREQ f, FREQ scale, T_ROUNDING_STYLE RoundingStyle = ROUND\_TO\_NEAREST)
- Parameters:
f (FREQ)
scale (FREQ)
RoundingStyle (T_ROUNDING_STYLE)
- to_int(BAUD br, BAUD scale, T_ROUNDING_STYLE RoundingStyle = ROUND\_TO\_NEAREST)
- Parameters:
br (BAUD)
scale (BAUD)
RoundingStyle (T_ROUNDING_STYLE)
- to_int(MEMORY mem, MEMORY scale, T_ROUNDING_STYLE RoundingStyle = ROUND\_UP)
- Parameters:
mem (MEMORY)
scale (MEMORY)
RoundingStyle (T_ROUNDING_STYLE)
- TimingToCycles(time Timing, time Clock_Period, T_ROUNDING_STYLE RoundingStyle = ROUND\_UP)
calculate needed counter cycles to achieve a given 1. timing/delay and 2. frequency/period
- Parameters:
Timing (time)
Clock_Period (time)
RoundingStyle (T_ROUNDING_STYLE)
- TimingToCycles(time Timing, FREQ Clock_Frequency, T_ROUNDING_STYLE RoundingStyle = ROUND\_UP)
- Parameters:
Timing (time)
Clock_Frequency (FREQ)
RoundingStyle (T_ROUNDING_STYLE)
- CyclesToDelay(natural Cycles, time Clock_Period)
- Parameters:
Cycles (natural)
Clock_Period (time)
- CyclesToDelay(natural Cycles, FREQ Clock_Frequency)
- Parameters:
Cycles (natural)
Clock_Frequency (FREQ)
- to_string(time t, natural precision)
convert and format physical types to STRING
- Parameters:
t (time)
precision (natural)
- to_string(FREQ f, natural precision)
- Parameters:
f (FREQ)
precision (natural)
- to_string(BAUD br, natural precision)
- Parameters:
br (BAUD)
precision (natural)
- to_string(MEMORY mem, natural precision)
- Parameters:
mem (MEMORY)
precision (natural)