PlTbUtils  1.3
PlTbUtils is a collection of functions, procedures and components for easily creating stimuli and checking response in automatic self-checking testbenches.
pltbutils_comp_pkg.vhd
Go to the documentation of this file.
1 
38 
39 library ieee;
40  use ieee.std_logic_1164.all;
41 
43 
45 
46  component pltbutils_clkgen is
47  generic (
48  G_PERIOD : time := 10 ns;
49  G_INITVALUE : std_logic := '0'
50  );
51  port (
52  clk_o : out std_logic;
53  clk_n_o : out std_logic;
54  stop_sim_i : in std_logic
55  );
56  end component pltbutils_clkgen;
57 
59  generic (
60  G_VERBOSITY : integer := 0;
61  G_RPT_LABEL : string := "pltbutils_time_measure"
62  );
63  port (
64  t_hi_o : out time; -- High time
65  t_lo_o : out time; -- Low time
66  t_per_o : out time; -- Period time
67  s_i : in std_logic -- Signal to measure
68  );
69  end component pltbutils_time_measure;
70 
71  component pltbutils_diff_check is
72  generic (
73  G_VERBOSITY : integer := 0;
74  G_RPT_LABEL : string := "pltbutils_diff_check"
75  );
76  port (
77  diff_error_o : out std_logic; -- High when diff error detected
78  diff_errors_o : out integer; -- Number of diff errors detected
79  s_i : in std_logic; -- Pos half of diff pair to check
80  s_n_i : in std_logic := '0'; -- Neg half of diff pair to check
81  rst_errors_i : in std_logic := '0' -- High resets diff error counter
82  );
83  end component pltbutils_diff_check;
84 
85 end package pltbutils_comp_pkg;
86 
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.
See pltbutils_comp.vhd for a description of the components.
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.
G_VERBOSITY integer := 0
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.