From a808051e1631ed84fed6e5b394e4a54856ea63b0 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Sun, 16 May 2010 21:02:29 +0200 Subject: [PATCH] hstring: length fix --- .gitignore | 3 +++ src/beh_display_tb.vhd | 2 +- src/beh_history_tb.vhd | 2 +- src/beh_parser_tb.vhd | 14 +++++++------- src/beh_scanner_tb.vhd | 4 ++-- src/parser.vhd | 4 ++-- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index b150b26..a27ea25 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ quartus/calc/ src/quartus*.tmp quartus/project_web.tcl quartus/project_tilab.tcl + +#stuff +tags diff --git a/src/beh_display_tb.vhd b/src/beh_display_tb.vhd index 02a8257..e7ef5e2 100644 --- a/src/beh_display_tb.vhd +++ b/src/beh_display_tb.vhd @@ -59,7 +59,7 @@ begin end process; process - variable input : hstring := "123513 "; + variable input : hstring := "123513 "; variable ctmp : character; variable checkall : boolean := true; diff --git a/src/beh_history_tb.vhd b/src/beh_history_tb.vhd index 7eb3029..cdd6e2a 100644 --- a/src/beh_history_tb.vhd +++ b/src/beh_history_tb.vhd @@ -59,7 +59,7 @@ begin end process; process - variable input : hstring := "12345678 "; + variable input : hstring := "12345678 "; variable ctmp : character; variable checkall : boolean := true; diff --git a/src/beh_parser_tb.vhd b/src/beh_parser_tb.vhd index 92b685c..cb4c5b5 100644 --- a/src/beh_parser_tb.vhd +++ b/src/beh_parser_tb.vhd @@ -76,12 +76,12 @@ begin i := 1; f_loop : while not endfile(f) loop - realresult := (71 => nul, others => ' '); + realresult := (72 => nul, others => ' '); f1_loop : while not endfile(f) loop readline (f, l); input := (others => nul); - if (l'length <= 71) then + if (l'length <= 72) then input(1 to l'length) := l.all; if (input(1) = '#') then next f1_loop; @@ -97,7 +97,7 @@ begin f2_loop : while not endfile(f) loop readline (f, l); expectedresult := (others => nul); - if (l'length <= 71) then + if (l'length <= 72) then expectedresult(1 to l'length) := l.all; if (expectedresult(1) = '#') then next f2_loop; @@ -113,10 +113,10 @@ begin -- ergebnis string richtig formatieren hstrtmp := expectedresult; - expectedresult := (71 => nul, others => ' '); - for x in 1 to 70 loop + expectedresult := (72 => nul, others => ' '); + for x in 1 to 71 loop if hstrtmp(x) /= nul then - expectedresult((70-y) + x) := hstrtmp(x); + expectedresult((71-y) + x) := hstrtmp(x); end if; end loop; @@ -128,7 +128,7 @@ begin icwait(sys_clk, 5); do_it <= '1'; run_tc := true; - j := 1; k := 70; + j := 1; k := 71; while run_tc loop wait on p_rget, p_wtake, p_finished, finished; diff --git a/src/beh_scanner_tb.vhd b/src/beh_scanner_tb.vhd index e904d76..f0704d5 100644 --- a/src/beh_scanner_tb.vhd +++ b/src/beh_scanner_tb.vhd @@ -127,7 +127,7 @@ begin f1_loop : while not endfile(f) loop readline (f, l); input := (others => nul); - if (l'length <= 71) then + if (l'length <= 72) then input(1 to l'length) := l.all; if (input(1) = '#') then next f1_loop; @@ -143,7 +143,7 @@ begin f2_loop : while not endfile(f) loop readline (f, l); expectedresult := (others => nul); - if (l'length <= 71) then + if (l'length <= 72) then expectedresult(1 to l'length) := l.all; if (expectedresult(1) = '#') then next f2_loop; diff --git a/src/parser.vhd b/src/parser.vhd index 54aebe6..fe7bda1 100644 --- a/src/parser.vhd +++ b/src/parser.vhd @@ -98,7 +98,7 @@ begin aktop_int <= ALU_NOP; opp_int <= ALU_NOP; err_int <= 0; - errc_int <= 70; + errc_int <= 71; errc_tmp_int <= 0; firstz_int <= true; -- out ports @@ -557,7 +557,7 @@ begin when SDONE => err_next <= 0; - errc_next <= 70; + errc_next <= 71; p_finished_next <= '1'; end case; -- 2.25.1