URL
https://opencores.org/ocsvn/pltbutils/pltbutils/trunk
Subversion Repositories pltbutils
Compare Revisions
- This comparison shows the changes necessary to convert path
/pltbutils/tags
- from Rev 108 to Rev 110
- ↔ Reverse comparison
Rev 108 → Rev 110
/v1.3/bench/vhdl/tb_pltbutils.vhd
0,0 → 1,646
---------------------------------------------------------------------- |
---- ---- |
---- PlTbUtils Testbench ---- |
---- ---- |
---- This file is part of the PlTbUtils project ---- |
---- http://opencores.org/project,pltbutils ---- |
---- ---- |
---- Description ---- |
---- PlTbUtils is a collection of functions, procedures and ---- |
---- components for easily creating stimuli and checking response ---- |
---- in automatic self-checking testbenches. ---- |
---- ---- |
---- This is a testbench file, which is used to verify ---- |
---- - pltbutils_func_pkg ---- |
---- - pltbutils_comp ---- |
---- This testbench is NOT selfchecking or automatic. ---- |
---- Manually check the transcript and waveform, when simulating. ---- |
---- It prints some informative text in the transcript, to help ---- |
---- with the manual inspection. ---- |
---- ---- |
---- ---- |
---- To Do: ---- |
---- - ---- |
---- ---- |
---- Author(s): ---- |
---- - Per Larsson, pela.opencores@gmail.com ---- |
---- ---- |
---------------------------------------------------------------------- |
---- ---- |
---- Copyright (C) 2013-2020 Authors and OPENCORES.ORG ---- |
---- ---- |
---- This source file may be used and distributed without ---- |
---- restriction provided that this copyright statement is not ---- |
---- removed from the file and that any derivative work contains ---- |
---- the original copyright notice and the associated disclaimer. ---- |
---- ---- |
---- This source file is free software; you can redistribute it ---- |
---- and/or modify it under the terms of the GNU Lesser General ---- |
---- Public License as published by the Free Software Foundation; ---- |
---- either version 2.1 of the License, or (at your option) any ---- |
---- later version. ---- |
---- ---- |
---- This source is distributed in the hope that it will be ---- |
---- useful, but WITHOUT ANY WARRANTY; without even the implied ---- |
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ---- |
---- PURPOSE. See the GNU Lesser General Public License for more ---- |
---- details. ---- |
---- ---- |
---- You should have received a copy of the GNU Lesser General ---- |
---- Public License along with this source; if not, download it ---- |
---- from http://www.opencores.org/lgpl.shtml ---- |
---- ---- |
---------------------------------------------------------------------- |
library ieee; |
use ieee.std_logic_1164.all; |
use ieee.numeric_std.all; |
use std.textio.all; |
use work.txt_util.all; |
use work.pltbutils_func_pkg.all; |
use work.pltbutils_comp_pkg.all; |
|
entity tb_pltbutils is |
generic ( |
G_SKIPTESTS : std_logic_vector := ( |
'0', -- Dummy |
'0', -- Test 1 |
'0', -- Test 2 |
'0', -- Test 3 |
'0', -- Test 4: NonSkipTest |
'1' -- Test 5: SkipTest |
); |
G_CLK_PERIOD : time := 10 ns; |
G_CHECKFILE_VERBOSITY : integer := 10; |
G_BINTESTFILE_HEADER : string := "Bintestfile R "; |
G_BINTESTFILE_LEN : integer := 528; |
G_BINTESTFILE_REFERENCE : string := "../../../bench/testfiles/bintestfile_reference.bin"; |
G_BINTESTFILE_CORRECT : string := "../../../bench/testfiles/bintestfile_correct.bin"; |
G_BINTESTFILE_ERROR : string := "../../../bench/testfiles/bintestfile_error.bin"; |
G_BINTESTFILE_SHORTER : string := "../../../bench/testfiles/bintestfile_shorter.bin"; |
G_BINTESTFILE_LONGER : string := "../../../bench/testfiles/bintestfile_longer.txt"; |
G_TEXTTESTFILE_REFERENCE : string := "../../../bench/testfiles/texttestfile_reference.txt"; |
G_TEXTTESTFILE_CORRECT : string := "../../../bench/testfiles/texttestfile_correct.txt"; |
G_TEXTTESTFILE_ERROR : string := "../../../bench/testfiles/texttestfile_error.txt"; |
G_TEXTTESTFILE_SHORTER : string := "../../../bench/testfiles/texttestfile_shorter.txt"; |
G_TEXTTESTFILE_LONGER : string := "../../../bench/testfiles/texttestfile_longer.txt"; |
G_DATTESTFILE_REFERENCE : string := "../../../bench/testfiles/dattestfile_reference.dat"; |
G_DATTESTFILE_CORRECT : string := "../../../bench/testfiles/dattestfile_correct.dat"; |
G_DATTESTFILE_ERROR : string := "../../../bench/testfiles/dattestfile_error.dat"; |
G_DATTESTFILE_SHORTER : string := "../../../bench/testfiles/dattestfile_shorter.dat"; |
G_DATTESTFILE_LONGER : string := "../../../bench/testfiles/dattestfile_longer.dat" |
); |
end entity tb_pltbutils; |
|
architecture bhv of tb_pltbutils is |
|
-- Simulation status- and control signals |
-- for accessing .stop_sim and for viewing in waveform window |
signal pltbs : pltbs_t := C_PLTBS_INIT; |
|
-- Expected number of checks and number of errors to be reported |
-- by pltbutils. The counting is made by variables, but the |
-- variables are copied to these signals for easier viewing in |
-- the simulator's waveform window. |
signal expected_checks_cnt : integer := 0; |
signal expected_errors_cnt : integer := 0; |
|
-- DUT stimuli and response signals |
signal clk : std_logic; |
signal clk_cnt : integer := 0; |
signal clk_cnt_clr : boolean := false; |
signal s_i : integer; |
signal s_sl : std_logic; |
signal s_slv : std_logic_vector(7 downto 0); |
signal s_u : unsigned(7 downto 0); |
signal s_s : unsigned(7 downto 0); |
signal s_b : boolean; |
signal s_time : time; |
signal s_str_exp : string(1 to 44); |
signal s_str1 : string(1 to 44); |
signal s_str2 : string(1 to 44); |
signal s_str3 : string(1 to 43); |
signal s_str4 : string(1 to 45); |
|
|
constant C_EXPECTED_SUCCESS : boolean := false; |
constant C_EXPECTED_FAIL : boolean := true; |
|
procedure check_cnt ( |
constant C_EXPECT_FAIL : boolean; |
variable v_checks_cnt : inout integer; |
variable v_errors_cnt : inout integer; |
signal checks_cnt : out integer; |
signal errors_cnt : out integer |
) is |
begin |
v_checks_cnt := v_checks_cnt + 1; |
if C_EXPECT_FAIL then |
v_errors_cnt := v_errors_cnt + 1; |
end if; |
checks_cnt <= v_checks_cnt; |
errors_cnt <= v_errors_cnt; |
end procedure check_cnt; |
|
begin |
|
-- Clock generator |
clkgen0 : pltbutils_clkgen |
generic map( |
G_PERIOD => G_CLK_PERIOD |
) |
port map( |
clk_o => clk, |
stop_sim_i => pltbs.stop_sim |
); |
|
-- Clock cycle counter |
p_clk_cnt : process (clk_cnt_clr, clk) |
begin |
if clk_cnt_clr then |
clk_cnt <= 0; |
elsif rising_edge(clk) then |
clk_cnt <= clk_cnt + 1; |
end if; |
end process p_clk_cnt; |
|
-- Testcase |
p_tc1 : process |
variable pltbv : pltbv_t := C_PLTBV_INIT; |
variable v_expected_tests_cnt : integer := 0; |
variable v_expected_skiptests_cnt : integer := 0; |
variable v_expected_checks_cnt : integer := 0; |
variable v_expected_errors_cnt : integer := 0; |
variable v_expected_data : integer; |
variable v_actual_data : integer; |
variable f_status : file_open_status; |
file txtfile : text; |
type charfile is file of character; |
file binfile : charfile; |
variable l : line; |
variable c : character; |
variable i : integer; |
variable v_errcnt : integer; |
variable msg : line; |
variable line_num : integer := 0; |
begin |
|
print(lf & "<Testing startsim()>"); |
startsim("tc1", G_SKIPTESTS, pltbv, pltbs); |
wait until rising_edge(clk); |
assert (pltbv.test_num = 0) and (pltbs.test_num = 0) |
report "test_num after startsim() incorrect" |
severity error; |
print("<Done testing startsim()>"); |
|
print(lf & "<Testing starttest() with auto-incrementing test_num>"); |
starttest("StartTest1", pltbv, pltbs); |
v_expected_tests_cnt := v_expected_tests_cnt + 1; |
wait until rising_edge(clk); |
assert (pltbv.test_num = 1) and (pltbs.test_num = 1) |
report "test_num after starttest() incorrect" |
severity error; |
print("<Done testing starttest() with auto-incrementing test_num()>"); |
|
print(lf & "<Testing endtest()>"); |
endtest(pltbv, pltbs); |
print("<Done testing endtest()>"); |
|
print(lf & "<Testing starttest() with explicit test_num>"); |
starttest(3, "StartTest2", pltbv, pltbs); |
v_expected_tests_cnt := v_expected_tests_cnt + 1; |
wait until rising_edge(clk); |
assert (pltbv.test_num = 3) and (pltbs.test_num = 3) |
report "test_num after startsim() incorrect" |
severity error; |
print("<Done testing starttest() with explicit test_num>"); |
|
print(lf & "<Testing starttest() and is_test_active() for non-skipped test>"); |
starttest(4, "NoSkipTest", pltbv, pltbs); |
if is_test_active(pltbv) then |
v_expected_tests_cnt := v_expected_tests_cnt + 1; |
wait until rising_edge(clk); |
else |
v_expected_skiptests_cnt := v_expected_skiptests_cnt + 1; |
wait until rising_edge(clk); |
assert false |
report "Executing test that should have been skipped" |
severity error; |
end if; |
endtest(pltbv, pltbs); |
print("<Done testing starttest() and is_test_active() for non-skipped test>"); |
|
print(lf & "<Testing starttest() and is_test_active() for skipped test>"); |
starttest(5, "SkipTest", pltbv, pltbs); |
if is_test_active(pltbv) then |
v_expected_tests_cnt := v_expected_tests_cnt + 1; |
wait until rising_edge(clk); |
assert false |
report "Executing test that should have been skipped" |
severity error; |
else |
--check("Checking if check() detects that it should not be called in skipped test", false, pltbv, pltbs); |
v_expected_skiptests_cnt := v_expected_skiptests_cnt + 1; |
end if; |
endtest(pltbv, pltbs); |
print("<Done testing starttest() and is_test_active() for skipped test>"); |
|
print(lf & "<Testing waitclks()>"); |
clk_cnt_clr <= true; |
wait until rising_edge(clk); |
clk_cnt_clr <= false; |
wait until rising_edge(clk); |
waitclks(10, clk, pltbv, pltbs); |
assert clk_cnt = 10 |
report "clk_cnt after waitclks() incorrect:" & integer'image(clk_cnt) & |
" expected:" & integer'image(10) |
severity error; |
print("<Done testing waitclks()>"); |
|
print(lf & "<Testing check() integer>"); |
s_i <= 0; |
wait until rising_edge(clk); |
check("Testing correct integer = 0", s_i, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_i <= 1; |
wait until rising_edge(clk); |
check("Testing correct integer = 1", s_i, 1, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_i <= 17; |
wait until rising_edge(clk); |
check("Testing incorrect integer = 17", s_i, 18, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_i <= -1; |
wait until rising_edge(clk); |
check("Testing negative integer = -1", s_i, -1, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() integer>"); |
|
print(lf & "<Testing check() std_logic>"); |
s_sl <= '0'; |
wait until rising_edge(clk); |
check("Testing correct std_logic = '0'", s_sl, '0', pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_sl <= '1'; |
wait until rising_edge(clk); |
check("Testing correct std_logic = '1'", s_sl, '1', pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_sl <= 'X'; |
wait until rising_edge(clk); |
check("Testing incorrect std_logic = '1'", s_sl, '1', pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() std_logic>"); |
|
print(lf & "<Testing check() std_logic against integer>"); |
s_sl <= '0'; |
wait until rising_edge(clk); |
check("Testing correct std_logic = '0'", s_sl, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_sl <= '1'; |
wait until rising_edge(clk); |
check("Testing correct std_logic = '1'", s_sl, 1, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_sl <= 'X'; |
wait until rising_edge(clk); |
check("Testing incorrect std_logic = '1'", s_sl, 1, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_sl <= '1'; |
wait until rising_edge(clk); |
check("Testing std_logic = '1' with incorrect expected", s_sl, 2, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() std_logic against integer>"); |
|
print(lf & "<Testing check() std_logic_vector>"); |
s_slv <= x"00"; |
wait until rising_edge(clk); |
check("Testing correct std_logic_vector = x'00'", s_slv, x"00", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"47"; |
wait until rising_edge(clk); |
check("Testing correct std_logic_vector = x'47'", s_slv, x"47", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"11"; |
wait until rising_edge(clk); |
check("Testing incorrect std_logic_vector = x'11'", s_slv, x"10", pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() std_logic_vector>"); |
|
print(lf & "<Testing check() std_logic_vector with mask>"); |
s_slv <= x"47"; |
wait until rising_edge(clk); |
check("Testing std_logic_vector = x'47' with correct nibble mask", s_slv, x"57", x"0F", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"47"; |
wait until rising_edge(clk); |
check("Testing std_logic_vector = x'47' with incorrect nibble mask", s_slv, x"57", x"F0", pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() std_logic_vector with mask>"); |
|
print(lf & "<Testing check() std_logic_vector against integer>"); |
s_slv <= x"00"; |
wait until rising_edge(clk); |
check("Testing correct std_logic_vector = x'00'", s_slv, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"47"; |
wait until rising_edge(clk); |
check("Testing correct std_logic_vector = x'47'", s_slv, 16#47#, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"11"; |
wait until rising_edge(clk); |
check("Testing incorrect std_logic_vector = x'11'", s_slv, 16#10#, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"FF"; |
wait until rising_edge(clk); |
check("Testing negative std_logic_vector = x'FF'", s_slv, -1, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() std_logic_vector against integer>"); |
|
print(lf & "<Testing check() std_logic_vector with mask against integer>"); |
s_slv <= x"47"; |
wait until rising_edge(clk); |
check("Testing std_logic_vector = x'47' with correct nibble mask", s_slv, 16#57#, x"0F", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_slv <= x"47"; |
wait until rising_edge(clk); |
check("Testing std_logic_vector = x'47' with incorrect nibble mask", s_slv, 16#57#, x"F0", pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() std_logic_vector with mask against integer>"); |
|
print(lf & "<Testing check() unsigned>"); |
s_u <= x"00"; |
wait until rising_edge(clk); |
check("Testing correct unsigned = x'00'", s_u, x"00", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_u <= x"47"; |
wait until rising_edge(clk); |
check("Testing correct unsigned = x'47'", s_u, x"47", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_u <= x"11"; |
wait until rising_edge(clk); |
check("Testing incorrect unsigned = x'11'", s_u, x"10", pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() unsigned>"); |
|
print(lf & "<Testing check() unsigned against integer>"); |
s_u <= x"00"; |
wait until rising_edge(clk); |
check("Testing correct unsigned = x'00'", s_u, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_u <= x"47"; |
wait until rising_edge(clk); |
check("Testing correct unsigned = x'47'", s_u, 16#47#, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_u <= x"11"; |
wait until rising_edge(clk); |
check("Testing incorrect unsigned = x'11'", s_u, 16#10#, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() unsigned against integer>"); |
|
print(lf & "<Testing check() signed>"); |
s_s <= x"00"; |
wait until rising_edge(clk); |
check("Testing correct signed = x'00'", s_s, x"00", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"47"; |
wait until rising_edge(clk); |
check("Testing correct signed = x'47'", s_s, x"47", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"11"; |
wait until rising_edge(clk); |
check("Testing incorrect signed = x'11'", s_s, x"10", pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"FF"; |
wait until rising_edge(clk); |
check("Testing negative signed = x'FF'", s_s, x"FF", pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() signed>"); |
|
print(lf & "<Testing check() signed against integer>"); |
s_s <= x"00"; |
wait until rising_edge(clk); |
check("Testing correct signed = x'00'", s_s, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"47"; |
wait until rising_edge(clk); |
check("Testing correct signed = x'47'", s_s, 16#47#, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"11"; |
wait until rising_edge(clk); |
check("Testing incorrect signed = x'11'", s_s, 16#10#, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"FF"; |
wait until rising_edge(clk); |
print("NOTE: Skipping test with negative signed. There seem to be a bug in ModelSim."); |
--print("The following check fails in ModelSim for unknown reason." & |
-- " It causes mismatch between expected number of errors" & |
-- " and the number presented by endsim()"); |
--check("Testing negative signed = x'FF'", s_s, -1, pltbv, pltbs); |
--check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() signed against integer>"); |
|
print(lf & "<Testing check() boolean>"); |
s_b <= false; |
wait until rising_edge(clk); |
check("Testing correct boolean = false", s_b, false, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_b <= true; |
wait until rising_edge(clk); |
check("Testing correct boolean = true", s_b, true, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_b <= false; |
wait until rising_edge(clk); |
check("Testing incorrect boolean = true", s_b, true, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() boolean>"); |
|
print(lf & "<Testing check() boolean against integer>"); |
s_b <= false; |
wait until rising_edge(clk); |
check("Testing correct boolean = false", s_b, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_b <= true; |
wait until rising_edge(clk); |
check("Testing correct boolean = true", s_b, 1, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_b <= false; |
wait until rising_edge(clk); |
check("Testing incorrect boolean = true", s_b, 1, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_b <= true; |
wait until rising_edge(clk); |
check("Testing boolean = true with incorrect expected", s_b, 2, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() boolean against integer>"); |
|
print(lf & "<Testing check() time>"); |
s_time <= 0 sec; |
wait until rising_edge(clk); |
check("Testing correct time = 0 sec", s_time, 0 sec, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_time <= 47 ns; |
wait until rising_edge(clk); |
check("Testing correct time = 47 ns", s_time, 47 ns, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_time <= 11 us; |
wait until rising_edge(clk); |
check("Testing incorrect time = 10 us", s_time, 10 us, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() time>"); |
|
print(lf & "<Testing check() time with tolerance>"); |
s_time <= 0 sec; |
wait until rising_edge(clk); |
check("Testing correct unsigned = 0 sec +/- 0 sec", s_time, 0 sec, 0 sec, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_time <= 47 ns - 3 ns; |
wait until rising_edge(clk); |
check("Testing correct time = 47 ns +/- 5 ns", s_time, 47 ns, 5 ns, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_time <= 10 us + 7 us; |
wait until rising_edge(clk); |
check("Testing incorrect time = 10 us +/- 5 us", s_time, 10 us, 5 us, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() time with tolerance>"); |
|
print(lf & "<Testing check() string>"); |
s_str_exp <= string'("The quick brown fox jumps over the lazy dog."); |
s_str1 <= string'("The quick brown fox jumps over the lazy dog."); |
s_str2 <= string'("The quick brown dog jumps over the lazy fox."); |
s_str3 <= string'("The quick brown fox jumps over the lazy dog"); |
s_str4 <= string'("The quick brown fox jumps over the lazy dog.."); |
wait until rising_edge(clk); |
check("Testing correct string", s_str1, s_str_exp, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"47"; |
wait until rising_edge(clk); |
check("Testing incorrect string with correct length", s_str2, s_str_exp, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_s <= x"11"; |
wait until rising_edge(clk); |
check("Testing too short string", s_str3, s_str_exp, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
wait until rising_edge(clk); |
check("Testing too long string", s_str4, s_str_exp, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() string>"); |
|
print(lf & "<Testing check() boolean expression>"); |
s_i <= 0; |
wait until rising_edge(clk); |
check("Testing correct boolean expression 0 = 16#00#", s_i = 16#00#, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
s_i <= 47; |
wait until rising_edge(clk); |
check("Testing incorrect boolean expression 47 < 16#10#", s_i < 16#10#, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check() boolean expresson>"); |
|
print(lf & "<Test readline() behaviour of the current simulator>"); |
print("Some simulators seem to handle CR and LF differently from others."); |
file_open(f_status, txtfile, G_TEXTTESTFILE_REFERENCE, read_mode); |
print("DEBUG: file_open_status: " & file_open_status'image(f_status)); |
if f_status /= open_ok then |
print("Failed to open " & G_TEXTTESTFILE_REFERENCE & " for reading: " & file_open_status'image(f_status)); |
else |
while not endfile(txtfile) loop |
readline(txtfile, l); |
line_num := line_num + 1; |
write(msg, "Line " & str(line_num) & ": " & str(l'length) & " characters: "); |
for i in l'range loop |
write(msg, character'pos(l(i))); |
write(msg, string'(" ")); |
end loop; |
writeline(output, msg); |
end loop; |
end if; |
print("<Done testing readline() behaviour>"); |
|
print(lf & "<Test reading binary files>"); |
-- Check if the current simulator running on the current operating system supports |
-- reading binary files as file of character. |
-- That is a requirement for check_binfile(). |
file_open(f_status, binfile, G_BINTESTFILE_REFERENCE, read_mode); |
print("DEBUG: file_open_status: " & file_open_status'image(f_status)); |
--check("Status of opening binary file", f_status = open_ok, file_open_status'image(f_status), "open_ok", pltbv, pltbs); |
--check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
if f_status = open_ok then |
i := 0; |
v_errcnt := 0; |
while not endfile(binfile) loop |
read(binfile, c); |
v_actual_data := character'pos(c); |
if i < G_BINTESTFILE_HEADER'length then |
v_expected_data := character'pos(G_BINTESTFILE_HEADER(i+1)); |
else |
v_expected_data := (i - G_BINTESTFILE_HEADER'length) mod 256; |
end if; |
if v_actual_data /= v_expected_data then |
v_errcnt := v_errcnt + 1; |
print("Error at offset " & str(i) & ": actual " & str(v_actual_data) & " expected " & str(v_expected_data)); |
end if; |
i := i + 1; |
end loop; |
file_close(binfile); |
check("Number of errors while reading binary file", v_errcnt, 0, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check("Number of bytes read from binary file", i, G_BINTESTFILE_LEN, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
end if; |
print("<Done testing reading binary files>"); |
|
print(lf & "<Testing check_binfile()"); |
check_binfile("Testing correct binary file", G_BINTESTFILE_CORRECT, G_BINTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_binfile("Testing binary file with error", G_BINTESTFILE_ERROR, G_BINTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_binfile("Testing shorter binary file", G_BINTESTFILE_SHORTER, G_BINTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_binfile("Testing longer binary file", G_BINTESTFILE_LONGER, G_BINTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check_binfile()"); |
|
print(lf & "<Testing check_txtfile()"); |
check_txtfile("Testing correct text file", G_TEXTTESTFILE_CORRECT, G_TEXTTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_txtfile("Testing text file with error", G_TEXTTESTFILE_ERROR, G_TEXTTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_txtfile("Testing shorter text file", G_TEXTTESTFILE_SHORTER, G_TEXTTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_txtfile("Testing longer text file", G_TEXTTESTFILE_LONGER, G_TEXTTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check_txtfile()"); |
|
print(lf & "<Testing check_datfile()"); |
check_datfile("Testing correct data file", G_DATTESTFILE_CORRECT, G_DATTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_SUCCESS, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_datfile("Testing data file with error", G_DATTESTFILE_ERROR, G_DATTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_datfile("Testing shorter data file", G_DATTESTFILE_SHORTER, G_DATTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
check_datfile("Testing longer data file", G_DATTESTFILE_LONGER, G_DATTESTFILE_REFERENCE, G_CHECKFILE_VERBOSITY, pltbv, pltbs); |
check_cnt(C_EXPECTED_FAIL, v_expected_checks_cnt, v_expected_errors_cnt, expected_checks_cnt, expected_errors_cnt); |
print("<Done testing check_datfile()"); |
|
print(lf & "<Testing endtest()>"); |
endtest(pltbv, pltbs); |
print("<Done testing endtest()>"); |
|
wait until rising_edge(clk); |
print(lf & "<Testing endsim()>"); |
print(""); |
print("Expected number of tests: " & str(v_expected_tests_cnt)); |
print("Expected number of skipped tests: " & str(v_expected_skiptests_cnt)); |
print("Expected number of checks: " & str(v_expected_checks_cnt)); |
print("Expected number of errors: " & str(v_expected_errors_cnt)); |
if v_expected_errors_cnt = 0 then |
print("Expected result: SUCCESS"); |
else |
print("Expected result: FAIL"); |
end if; |
wait until rising_edge(clk); |
endsim(pltbv, pltbs, true); |
wait until rising_edge(clk); |
print("<Done testing endsim()>"); |
|
wait; |
end process p_tc1; |
end architecture bhv; |
/v1.3/bench/vhdl/tb_files.lst
0,0 → 1,646
tb_pltbutils.vhd |
/v1.3/bench/testfiles/bintestfile_correct.bin
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
v1.3/bench/testfiles/bintestfile_correct.bin
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: v1.3/bench/testfiles/bintestfile_error.bin
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: v1.3/bench/testfiles/bintestfile_error.bin
===================================================================
--- v1.3/bench/testfiles/bintestfile_error.bin (nonexistent)
+++ v1.3/bench/testfiles/bintestfile_error.bin (revision 110)
v1.3/bench/testfiles/bintestfile_error.bin
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: v1.3/bench/testfiles/bintestfile_longer.bin
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: v1.3/bench/testfiles/bintestfile_longer.bin
===================================================================
--- v1.3/bench/testfiles/bintestfile_longer.bin (nonexistent)
+++ v1.3/bench/testfiles/bintestfile_longer.bin (revision 110)
v1.3/bench/testfiles/bintestfile_longer.bin
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: v1.3/bench/testfiles/bintestfile_reference.bin
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: v1.3/bench/testfiles/bintestfile_reference.bin
===================================================================
--- v1.3/bench/testfiles/bintestfile_reference.bin (nonexistent)
+++ v1.3/bench/testfiles/bintestfile_reference.bin (revision 110)
v1.3/bench/testfiles/bintestfile_reference.bin
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: v1.3/bench/testfiles/bintestfile_shorter.bin
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: v1.3/bench/testfiles/bintestfile_shorter.bin
===================================================================
--- v1.3/bench/testfiles/bintestfile_shorter.bin (nonexistent)
+++ v1.3/bench/testfiles/bintestfile_shorter.bin (revision 110)
v1.3/bench/testfiles/bintestfile_shorter.bin
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: v1.3/bench/testfiles/dattestfile_correct.dat
===================================================================
--- v1.3/bench/testfiles/dattestfile_correct.dat (nonexistent)
+++ v1.3/bench/testfiles/dattestfile_correct.dat (revision 110)
@@ -0,0 +1,10 @@
+# Dattestfile (modified comments and whitespaces, but it shouldn't matter)
+1 2
+3
+4 5 6
+7 8 9
+ ABC DEF
+GHI
+ JKL MNO PQR
+# Modified Comment
+STUVW XYZ
Index: v1.3/bench/testfiles/dattestfile_error.dat
===================================================================
--- v1.3/bench/testfiles/dattestfile_error.dat (nonexistent)
+++ v1.3/bench/testfiles/dattestfile_error.dat (revision 110)
@@ -0,0 +1,9 @@
+# Dattestfile Error
+1
+2
+7
+4 5 6
+7 8 9
+ ABC DEF GHI
+ JqL MNO PQR # Comment2
+STUVW XYZ
Index: v1.3/bench/testfiles/dattestfile_longer.dat
===================================================================
--- v1.3/bench/testfiles/dattestfile_longer.dat (nonexistent)
+++ v1.3/bench/testfiles/dattestfile_longer.dat (revision 110)
@@ -0,0 +1,9 @@
+# Dattestfile
+1
+2
+3
+4 5 6
+7 8 9
+ ABC DEF GHI
+ JKL MNO PQR # Comment
+STUVW XYZ WOW
Index: v1.3/bench/testfiles/dattestfile_reference.dat
===================================================================
--- v1.3/bench/testfiles/dattestfile_reference.dat (nonexistent)
+++ v1.3/bench/testfiles/dattestfile_reference.dat (revision 110)
@@ -0,0 +1,9 @@
+# Dattestfile
+1
+2
+3
+4 5 6
+7 8 9
+ ABC DEF GHI
+ JKL MNO PQR # Comment
+STUVW XYZ
Index: v1.3/bench/testfiles/dattestfile_shorter.dat
===================================================================
--- v1.3/bench/testfiles/dattestfile_shorter.dat (nonexistent)
+++ v1.3/bench/testfiles/dattestfile_shorter.dat (revision 110)
@@ -0,0 +1,9 @@
+# Dattestfile
+1
+2
+3
+4 5 6
+7 8 9
+ ABC DEF GHI
+ JKL MNO PQR # Comment
+STUVW
Index: v1.3/bench/testfiles/texttestfile_correct.txt
===================================================================
--- v1.3/bench/testfiles/texttestfile_correct.txt (nonexistent)
+++ v1.3/bench/testfiles/texttestfile_correct.txt (revision 110)
@@ -0,0 +1,3 @@
+Texttestfile line 1
+line 2
+line 3
Index: v1.3/bench/testfiles/texttestfile_error.txt
===================================================================
--- v1.3/bench/testfiles/texttestfile_error.txt (nonexistent)
+++ v1.3/bench/testfiles/texttestfile_error.txt (revision 110)
@@ -0,0 +1,3 @@
+Texttestfile lone 1
+line 2
+line 3
Index: v1.3/bench/testfiles/texttestfile_longer.txt
===================================================================
--- v1.3/bench/testfiles/texttestfile_longer.txt (nonexistent)
+++ v1.3/bench/testfiles/texttestfile_longer.txt (revision 110)
@@ -0,0 +1,4 @@
+Texttestfile line 1
+line 2
+line 3
+l
\ No newline at end of file
Index: v1.3/bench/testfiles/texttestfile_reference.txt
===================================================================
--- v1.3/bench/testfiles/texttestfile_reference.txt (nonexistent)
+++ v1.3/bench/testfiles/texttestfile_reference.txt (revision 110)
@@ -0,0 +1,3 @@
+Texttestfile line 1
+line 2
+line 3
Index: v1.3/bench/testfiles/texttestfile_shorter.txt
===================================================================
--- v1.3/bench/testfiles/texttestfile_shorter.txt (nonexistent)
+++ v1.3/bench/testfiles/texttestfile_shorter.txt (revision 110)
@@ -0,0 +1,3 @@
+Texttestfile line 1
+line 2
+line
\ No newline at end of file
Index: v1.3/doc/release_note.txt
===================================================================
--- v1.3/doc/release_note.txt (nonexistent)
+++ v1.3/doc/release_note.txt (revision 110)
@@ -0,0 +1,133 @@
+pltbutils release_note.txt
+
+v1.3 May 12, 2020
+1. Updated private procedure get_file_item() for correct functionality with
+ XSim.
+2. Added simulation directory xsim_pltbutils.
+
+v1.2 March 11, 2020
+1. Added waitsig() for unclocked std_logic in pltbutils_func_pkg.vhd .
+2. Added check_binfile(), check_txtfile(), check_datfile() in
+ pltbutils_func_pkg.vhd .
+3. Added str() for converting integer to string with fixed field width
+ in pltbutils_func_pkg.vhd .
+4. Added str_equal() for comparing strings in pltbutils_func_pkg.vhd .
+5. Improved handling of internal (private) procedures
+ in pltbutils_func_pkg.vhd .
+6. Added components pltbutils_time_measure and pltbutils_diff_check
+ in pltbutils_comp.vhd / pltbutils_comp_pkg.vhd
+7. Minor updates to scripts.
+8. Updated specification_pltbutils.docx / .pdf
+
+v1.1 August 14, 2018
+1. Corrected handling of skipped tests.
+ Thanks to Kent Damberg for finding the bug.
+
+v1.0 January 26, 2016
+1. Updated specification_pltbutils.docx / .pdf
+
+beta004 January 3, 2016
+1. Added skiptest argument to startsim().
+2. Added function is_test_active().
+3. Updated examples, testbenches and templates.
+4. Updated specification_pltbutils.docx / .pdf
+
+beta0003 November 23, 2015
+1. Added check() for boolean.
+2. Added check() for boolean against integer.
+3. Added check() for time.
+4. Added check() for time with tolerance. Suggested by Stefan Eriksson.
+5. Updated tb_pltbutils.vhd with tests for the new check() procedures.
+6. Updated specification_pltbutils.docx / .pdf
+
+Thanks to Stefan Eriksson for suggesting features and providing feedback
+on documentation.
+
+beta0002 February 2, 2015
+1. endsim(): renamed argument from force to force_stop for clarity.
+2. print2(string, string): corrected call, from print() to print2().
+3. print2(pltbv_t, pltbs_t, string): corrected call, from print() to print2().
+4. pltbutils_func_pkg.vhd: more comments.
+5. waitsig(): added overloaded unclocked variant.
+6. hxstr(): no longer wrapper for hstr, improved with unlimited length of
+ argument s.
+7. Updated author's email address in all files where applicable.
+8: Updated specification_pltbutils.docx/.pdf.
+
+beta0001 April 9, 2014
+1. Added check() for string.
+
+alpha0007 January 13, 2014
+1. Renamed example/vhdl/*.* to examples/vhdl/examples2/*.*
+ This is example code where the testcase process(es) are located
+ in a testcase component, enabling multiple testcase architectures.
+ Renamed sim/example_sim/ to sim/modelsim_tb_example2/
+2. Created examples/vhdl/examples1/
+ This is example code where the testcase process is located in the
+ testbench top.
+ Created sim/modelsim_tb_example1/
+3. Renamed sim/bench_sim/ to sim/modelsim_tb_pltbutils/
+4. Renamed template/vhdl/*.* to templates/vhdl/template2/*.*
+5. Created templates/vhdl/template1/
+6. Updated specification_pltbutils.docx/pdf to rev 0.5
+
+alpha0006 January 09, 2014
+1. Replaced shared variables with a normal variable, and global signals with
+ a normal signal.
+ VHDL-2000 and later requires that shared variables use protected types,
+ but protected types weren't available in earlier VHDL versions.
+ As a consequence, some simulators in VHDL-200x mode require protected
+ types. But some simulators still don't support protected types at all.
+ To make pltbutils work in all (or at least in most) VHDL simulators,
+ shared variables have now been removed.
+ In previous versions of pltbutils, protected types were used by default.
+ There were comments in the pltbutils code as an aid to modify the code
+ for simulators that don't support protected types, but it was too much
+ work to do the modifications. One possible solution could have been to
+ make separate variants of pltbutils; one with, and one without protected
+ types. But that solution was not tempting.
+2. Removed src/vhdl/pltbutils_type_pkg.vhd .
+3. Added doc/required_updates.txt .
+
+alpha0005 January 05, 2014
+1. In pltbutils_func_pkg.vhd, added starttest() and endtest().
+2. testname() is now depricated, and will be removed. Use starttest() instead.
+3. Added pltbutils_user_cfg_pkg.vhd and modified pltbutils_func_pkg.vhd to
+ support user configurable report messages, to support continous
+ integration environments, e.g. TeamCity.
+4. Updated specification.
+
+alpha0004 December 3, 2013
+1. Corrected returned ranges from to_ascending() and to_descending()
+ in pltbutils_func_pkg.vhd, to make them work with vectors where the lowest
+ bit does not have number 0.
+
+alpha0003 December 2, 2013
+1. Added a line feed before printing the test name for clarity,
+ in procedure testname() in pltbutils.vhd .
+2. Added functions to_ascending(), to_descending() and hxstr()
+ in pltbutils.vhd (not yet included in the specification).
+3. check() in pltbutils.vhd now outputs hexadecimal values instead of
+ binary values for std_logic_vector, unsigned and signed.
+4. Updated tb_example.vhd, tc_example.vhd and tc1.vhd to feed
+ the generic G_DISABLE_BUGS to tc1.
+ The message "Bug here somewhere" is now only output when
+ G_DISABLE_BUGS=0.
+
+alpha0002 November 10, 2013
+1. Added doc/release_note.txt
+2. Removed file paths from pltbutils_files.lst
+3. Added overloaded print procedures with boolean argument called active,
+ which is useful for debug switches, etc.
+4. Added inverted clock output and a generic for setting initial value to
+ pltbutils_clkgen in pltbutils_comp.vhd and pltbutils_comp_pkg.vhd .
+ The inverted clock output can be used when a differential
+ clock is needed.
+5. Added overloaded procedures waitsig().
+6. Updated specification.
+
+alpha0001 September 2, 2013
+1. First commit
+
+April 14, 2013
+1. PlTbUtils project registered on OpenCores.
Index: v1.3/doc/specification_pltbutils.pdf
===================================================================
--- v1.3/doc/specification_pltbutils.pdf (nonexistent)
+++ v1.3/doc/specification_pltbutils.pdf (revision 110)
@@ -0,0 +1,6145 @@
+%PDF-1.7
+%µµµµ
+1 0 obj
+<>/Metadata 1601 0 R/ViewerPreferences 1602 0 R>>
+endobj
+2 0 obj
+<>
+endobj
+3 0 obj
+<>/ExtGState<>/XObject<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 15 0 R] /MediaBox[ 0 0 612 792] /Contents 4 0 R/Group<>/Tabs/S/StructParents 0>>
+endobj
+4 0 obj
+<>
+stream
+xœµ˜MoÚ@†ï–üæhWeð~Ú[EQH£TAJQ¨j9 ÚßßYJ^ xÍÁ–ñzßÇ3ïÎŽíþbTÂÕU»×¹ïBÒ~•cˆŠ²õÔ¯¯á¦Û_a`b†qH@Ó15–E|eÜ ý™Ý<‡£A 0©@a@sƒ\Ã`Fƒîú)ŒW4!Œ7WÙöê.†Ä?`ð%niº¯a ·½À> ó
+˜4‰´ã‘mø6XçÓð:4ÜA£Gq ¨C#@fûÉc9%8êCœÇéàçÓz2]Æ’^±§èHÖQR^q8(
+È4EyˆÓ_ùäy’Ö“yyM7)Ú‘Jë¹›k$7W 2º9EtZÈ5…HLšÃ6
+aÙuÜ6«µeH`
+Þ/]®QdÕ’o.ç>·æ«~Ioæ«Ù‰»¹¥Fé¡pº+´Ö”íMÈ óìí6ŸJðŒÙ“¡ô¨¦Ùþm_oí=”Ûï+÷³Ñ¸`ºs؉þµxé
+endstream
+endobj
+5 0 obj
+<>
+endobj
+6 0 obj
+<>
+endobj
+7 0 obj
+<>
+endobj
+8 0 obj
+<>
+endobj
+9 0 obj
+<>
+endobj
+10 0 obj
+<>
+endobj
+11 0 obj
+<>
+endobj
+12 0 obj
+<>
+endobj
+13 0 obj
+<>
+endobj
+14 0 obj
+<>
+endobj
+15 0 obj
+<>/F 4/A<>/StructParent 1/Contents(OC_logo_noframe) >>
+endobj
+16 0 obj
+<>
+stream
+xœí}[TÇ™fã×5ôíu¤†÷•tUÏFÌÈ\öi$âm
+;ÕTwuk%²lËr„ ¯½!d$ÄÎŽ$¤Øi#ÀÞsi<ŽµgWi&†‹@¶%À\„äØ Û\eiD×9ûeþ'ÿÊÊ<™uªºèîüÔ*NÊ“'O^¾óß23Žï-D⣬¾•é»Ž³pÝéóWTâäùqÿXWèÄRŽÇWTØ#¦£]‡F;r½Ý]Öþæìå¸BJåHÓUg<