OpenCores
URL https://opencores.org/ocsvn/pltbutils/pltbutils/trunk

Subversion Repositories pltbutils

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 108 to Rev 109
    Reverse comparison

Rev 108 → Rev 109

/pltbutils/trunk/bench/vhdl/tb_pltbutils.vhd
173,11 → 173,15
variable v_expected_data : integer;
variable v_actual_data : integer;
variable f_status : file_open_status;
type charfile is file of character;
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()>");
530,6 → 534,26
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.
561,7 → 585,7
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("<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);
/pltbutils/trunk/doc/release_note.txt
1,5 → 1,10
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/trunk/sim/xsim_tb_pltbutils/bin/tb_pltbutils.prj
0,0 → 1,7
vhdl xil_defaultlib ../../../src/vhdl/txt_util.vhd
vhdl xil_defaultlib ../../../src/vhdl/pltbutils_user_cfg_pkg.vhd
vhdl xil_defaultlib ../../../src/vhdl/pltbutils_func_pkg.vhd
vhdl xil_defaultlib ../../../src/vhdl/pltbutils_comp.vhd
vhdl xil_defaultlib ../../../src/vhdl/pltbutils_comp_pkg.vhd
vhdl xil_defaultlib ../../../bench/vhdl/tb_pltbutils.vhd
/pltbutils/trunk/sim/xsim_tb_pltbutils/bin/tc1.bat
0,0 → 1,10
@echo off
set tb_name=tb_pltbutils
set libname=xil_defaultlib
 
call xelab -prj ..\bin\%tb_name%.prj -s %tb_name% %libname%.%tb_name%
::echo xelab error level: %errorlevel%
if %errorlevel% equ 0 (
call xsim -runall %tb_name%
)
echo Error level (0 is good): %errorlevel%
/pltbutils/trunk/src/vhdl/pltbutils_func_pkg.vhd
770,11 → 770,11
-- Find next item on the line
read(l, c, c_good);
-- Skip leading whitespace characters
while c_good and (c = ' ' or c = ht) loop
while c_good and (c = ' ' or c = ht or c = cr or c = lf) loop
read(l, c, c_good);
end loop;
-- Read item until next whitespace, comment character or end-of-line
while c_good and c /= ' ' and c /= ht and c /= '#' loop
while c_good and c /= ' ' and c /= ht and c /= cr and c /= lf and c /= '#' loop
-- If i >= item'length, an error will occur. We don't try to do anything
-- about that here, because it is probably better that the user
-- find out the hard way, instead of trying to hide the problem.
2247,12 → 2247,12
file_open(f1_status, f1, filename1, read_mode);
if f1_status /= open_ok then
v_file_errors := v_file_errors + 1;
write(error_line, " Could not open file " & filename1 & " for reading.");
write(error_line, " Could not open file " & filename1 & " for reading: " & file_open_status'image(f1_status));
else
file_open(f2_status, f2, filename2, read_mode);
if f2_status /= open_ok then
v_file_errors := v_file_errors + 1;
write(error_line, " Could not open file " & filename2 & " for reading. ");
write(error_line, " Could not open file " & filename2 & " for reading: " & file_open_status'image(f2_status));
file_close(f1);
end if;
end if;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.