35 use ieee.std_logic_1164.
all;
89 use ieee.std_logic_1164.
all;
135 variable last_rising_edge : time := -1 ns;
136 variable last_falling_edge : time := -1 ns;
138 if rising_edge(s_i) then
139 if last_falling_edge >= 0 ns then
140 t_lo <= now - last_falling_edge;
142 if last_rising_edge >= 0 ns then
143 t_per <= now - last_rising_edge;
145 last_rising_edge := now;
148 if falling_edge(s_i) then
149 if last_rising_edge >= 0 ns then
150 t_hi <= now - last_rising_edge;
152 last_falling_edge := now;
154 end process measure_p;
172 end architecture bhv;
175 use ieee.std_logic_1164.
all;
236 end process diff_check_p;
245 end architecture bhv;
std_logic := G_INITVALUE clk
time := G_PERIOD/ 2 C_HALF_PERIOD
Creates a clock for use in a testbench.
out clk_n_o std_logic
Inverted clock for differential clocks.
out clk_o std_logic
Clock output.
in stop_sim_i std_logic
Stops the clock when '1'.
G_PERIOD time := 10 ns
Clock period.
G_INITVALUE std_logic := '0'
Initial value of the clock.
std_logic := '0' diff_error
integer :=( 2** 30)+(( 2** 30)- 1) C_INTEGER_MAX
Checks that the negative half of a diff pair is the always the complement of the positive half.
in s_n_i std_logic := '0'
Neg half of diff pair to check.
out diff_errors_o integer
Number of diff errors detected.
G_RPT_LABEL string := "pltbutils_diff_check"
in s_i std_logic
Pos half of diff pair to check.
out diff_error_o std_logic
High when diff error detected.
in rst_errors_i std_logic := '0'
High resets diff error counter.
Measures high-time, low-time and period of a signal, usually a clock.
out t_hi_o time
High time.
G_RPT_LABEL string := "pltbutils_time_measure"
in s_i std_logic
Signal to measure.
out t_per_o time
Period time.
out t_lo_o time
Low time.