Skip to content
Snippets Groups Projects
Commit 50d1943f authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Support print enable variant option in print_str().

parent ba91dd79
Branches
No related tags found
1 merge request!190Resolve L2SDP-210
...@@ -57,6 +57,7 @@ PACKAGE common_str_pkg IS ...@@ -57,6 +57,7 @@ PACKAGE common_str_pkg IS
FUNCTION real_to_str(re: REAL; width : INTEGER; digits : INTEGER) RETURN STRING; FUNCTION real_to_str(re: REAL; width : INTEGER; digits : INTEGER) RETURN STRING;
PROCEDURE print_str(str : STRING); PROCEDURE print_str(str : STRING);
PROCEDURE print_str(str: STRING; enable: BOOLEAN);
FUNCTION str_to_ascii_integer_arr(s: STRING) RETURN t_integer_arr; FUNCTION str_to_ascii_integer_arr(s: STRING) RETURN t_integer_arr;
FUNCTION str_to_ascii_slv_8_arr( s: STRING) RETURN t_slv_8_arr; FUNCTION str_to_ascii_slv_8_arr( s: STRING) RETURN t_slv_8_arr;
...@@ -269,6 +270,14 @@ PACKAGE BODY common_str_pkg IS ...@@ -269,6 +270,14 @@ PACKAGE BODY common_str_pkg IS
deallocate(v_line); deallocate(v_line);
END; END;
PROCEDURE print_str(str: STRING; enable: BOOLEAN) IS
VARIABLE v_line: LINE;
BEGIN
IF enable THEN
print_str(str);
END IF;
END;
FUNCTION str_to_ascii_integer_arr(s: STRING) RETURN t_integer_arr IS FUNCTION str_to_ascii_integer_arr(s: STRING) RETURN t_integer_arr IS
VARIABLE r: t_integer_arr(0 TO s'RIGHT-1); VARIABLE r: t_integer_arr(0 TO s'RIGHT-1);
BEGIN BEGIN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment