Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kraigher authored and LarsAsplund committed Nov 19, 2023
1 parent 87d5b4a commit c16718d
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 69 deletions.
1 change: 0 additions & 1 deletion vunit/vhdl/check/src/check.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ package body check_pkg is

procedure close_window(cycle : unsigned; is_ok : boolean) is
variable close_ok : boolean := is_ok;
variable pass_msg_en : boolean;
begin
if is_x(end_event) then
close_ok := false;
Expand Down
2 changes: 1 addition & 1 deletion vunit/vhdl/check/test/tb_check.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ begin

check_runner : process
variable passed : boolean;
variable check_result, check_result2 : check_result_t;
variable check_result : check_result_t;
variable stat : checker_stat_t;
constant default_level : log_level_t := error;

Expand Down
2 changes: 0 additions & 2 deletions vunit/vhdl/check/test/tb_check_not_unknown.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ architecture test_fixture of tb_check_not_unknown is
alias en_5 : std_logic is check_not_unknown_in_5(0);
alias en_6 : std_logic is check_not_unknown_in_6(0);

constant my_checker : checker_t := new_checker("my_checker1");
constant my_checker2 : checker_t := new_checker("my_checker2");
constant my_checker3 : checker_t := new_checker("my_checker3", default_log_level => info);
constant my_checker4 : checker_t := new_checker("my_checker4");
constant my_checker5 : checker_t := new_checker("my_checker5");
constant my_checker6 : checker_t := new_checker("my_checker6", default_log_level => info);

Expand Down
6 changes: 2 additions & 4 deletions vunit/vhdl/check/test/tb_checker.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ use vunit_lib.logger_pkg.all;

entity tb_checker is
generic (
runner_cfg : string := "";
output_path : string);
runner_cfg : string := "");
end entity;

architecture test_fixture of tb_checker is
begin
test_runner : process
variable checker1, checker2 : checker_t;
variable stat, stat1, stat2 : checker_stat_t;
variable stat1, stat2 : checker_stat_t;
variable stat_before, stat_after : checker_stat_t;
variable my_checker : checker_t := new_checker("my_checker");
variable my_logger : logger_t := get_logger(my_checker);
Expand Down
1 change: 0 additions & 1 deletion vunit/vhdl/check/test/tb_result.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ architecture test_fixture of tb_result is
begin
test_runner : process
constant punctuation_marks_not_preceeded_by_space : string := ".,:;?!";
variable stat : checker_stat_t;
begin
test_runner_setup(runner, runner_cfg);

Expand Down
3 changes: 0 additions & 3 deletions vunit/vhdl/com/src/com.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,6 @@ package body com_pkg is
variable reply_msg : inout msg_t;
constant timeout : in time := max_timeout) is
variable status : com_status_t;
variable source_actor : actor_t;
variable mailbox : mailbox_id_t;
variable message : message_ptr_t;
begin
delete(reply_msg);

Expand Down
4 changes: 1 addition & 3 deletions vunit/vhdl/com/test/tb_com.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ begin
test_runner : process
variable self, actor, actor2, actor3, actor4 : actor_t;
variable actor5, my_receiver, my_sender, server, publisher : actor_t;
variable publisher2, subscriber, subscriber2, subscriber3 : actor_t;
variable subscriber : actor_t;
variable actor_vec : actor_vec_t(0 to 2);
variable status : com_status_t;
variable n_actors : natural;
Expand All @@ -43,9 +43,7 @@ begin
variable msg, msg2, msg3, msg4 : msg_t;
variable request_msg, request_msg2, request_msg3, reply_msg : msg_t;
variable peeked_msg1, peeked_msg2 : msg_t;
variable msg_vec_ptr : msg_vec_ptr_t;
variable deprecated_message : message_ptr_t;
variable subscription_vec_ptr : subscription_vec_ptr_t;
variable actor_state : actor_state_t;
variable mailbox_state : mailbox_state_t;
variable l : line;
Expand Down
4 changes: 0 additions & 4 deletions vunit/vhdl/data_types/test/tb_codec.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,12 @@ begin
return ieee.numeric_std."="(l, r);
end function "=";

variable r1, r2 : real;
constant positive_zero : real := 0.0;
constant negative_zero : real := -1.0/1.0e45;
constant positive_infinity : real := 1.0e39;
constant negative_infinity : real := -1.0e39;

constant special_chars : string(1 to 3) := "),(";
constant comma : character := ',';
constant lp : character := '(';
constant rp : character := ')';
variable null_string : string(10 to 9);
variable t1 : time;
variable string_15_downto_4 : string(15 downto 4);
Expand Down
4 changes: 1 addition & 3 deletions vunit/vhdl/dictionary/test/tb_dictionary.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ use std.textio.all;

entity tb_dictionary is
generic (
runner_cfg : string;
output_path : string);
runner_cfg : string);
end entity tb_dictionary;

architecture test_fixture of tb_dictionary is
begin

test_runner : process
variable value : line;
variable stat : checker_stat_t;
variable passed : boolean;
constant empty_dict : frozen_dictionary_t := empty;
constant test_dict : frozen_dictionary_t := "output path : c::\foo\bar, input path : c::\ying\yang, active python runner : true";
Expand Down
9 changes: 0 additions & 9 deletions vunit/vhdl/logging/src/log_handler_pkg-body.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ package body log_handler_pkg is
constant max_logger_name_idx : natural := 5;
constant log_handler_length : natural := max_logger_name_idx + 1;

constant max_time_str : string := time'image(1 sec);
constant max_time_length : natural := max_time_str'length;

procedure assert_status(status : file_open_status; file_name : string) is
begin
assert status = open_ok
report "Failed to open file " & file_name & " - " & file_open_status'image(status) severity failure;
end procedure;

procedure init_log_file(log_handler : log_handler_t; file_name : string) is
variable file_id : file_id_t := to_file_id(get(log_handler.p_data, file_id_idx));
begin
Expand Down
1 change: 0 additions & 1 deletion vunit/vhdl/logging/src/log_levels_pkg-body.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ package body log_levels_pkg is

impure function create_levels return levels_t is
variable result : levels_t;
variable name_ptr : string_ptr_t;

procedure add_level(log_level : log_level_t; fg, bg : ansi_color_t := no_color; style : ansi_style_t := normal) is
begin
Expand Down
11 changes: 0 additions & 11 deletions vunit/vhdl/logging/src/logger_pkg-body.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,6 @@ package body logger_pkg is
return to_id(get(logger.p_data, id_idx));
end;

impure function new_logger(name : string; parent : logger_t) return logger_t is
constant parent_id : id_t := get_id(parent);
constant id : id_t := get_id(name, parent_id);
begin
if id = null_id then
return null_logger;
end if;

return new_logger(id, parent);
end;

impure function get_real_parent(parent : logger_t) return logger_t is
begin
if parent = null_logger then
Expand Down
1 change: 0 additions & 1 deletion vunit/vhdl/logging/src/print_pkg-body.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ package body print_pkg is
procedure print(str : string;
file_name : string;
mode : file_open_kind range write_mode to append_mode := append_mode) is
variable l : line;
variable status : file_open_status;
file f : text;
begin
Expand Down
4 changes: 0 additions & 4 deletions vunit/vhdl/logging/test/tb_log.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ begin
procedure check_log_file (file_handler : log_handler_t;
file_name : string;
entries : dict_t) is
file fptr : text;
variable l : line;
variable status : file_open_status;
begin
assert get_file_name(file_handler) = file_name report "file name mismatch";
flush_file_handler(file_handler);
Expand All @@ -83,7 +80,6 @@ begin
constant print_file_name : string := output_path(runner_cfg) & "print.csv";
variable logger : logger_t := get_logger("logger");
variable nested_logger : logger_t := get_logger("nested", parent => logger);
variable other_logger : logger_t := get_logger("other");
variable tmp_logger : logger_t;
variable entries : dict_t := new_dict;
variable entries2 : dict_t := new_dict;
Expand Down
1 change: 0 additions & 1 deletion vunit/vhdl/run/src/run.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ package body run_pkg is
impure function enabled(
constant name : string)
return boolean is
variable i : natural := 1;
begin
if get_run_all(runner_state) then
return true;
Expand Down
7 changes: 0 additions & 7 deletions vunit/vhdl/run/test/run_tests.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,8 @@ begin
variable i : natural;
variable n_run_a, n_run_b, n_run_c : natural := 0;
variable t_start : time;
constant test_checker : checker_t := new_checker("test_checker");
variable runner_cfg : line;
variable passed : boolean;
variable level : log_level_t;
variable my_checker : checker_t;
variable error_counter : natural := 0;
constant test_runner_logger : logger_t := get_logger("test_runner");
constant test_runner_setup_entry_key : key_t := get_entry_key(test_runner_setup);
constant test_runner_setup_exit_key : key_t := get_exit_key(test_runner_setup);
constant test_case_setup_entry_key : key_t := get_entry_key(test_case_setup);
constant test_case_setup_exit_key : key_t := get_exit_key(test_case_setup);

Expand Down
1 change: 0 additions & 1 deletion vunit/vhdl/string_ops/test/tb_string_ops.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ begin
variable ascending_vector : std_logic_vector(3 to 11);
variable descending_vector : std_logic_vector(13 downto 5);
variable l : lines_t;
variable n_asserts_value, n_errors_value : integer;
constant offset_string :string(10 to 16) := "foo bar";
constant reverse_string :string(16 downto 10) := "foo bar";
constant reversed_vector :unsigned(16 downto 4) := "1011010101001";
Expand Down
8 changes: 1 addition & 7 deletions vunit/vhdl/verification_components/src/wishbone_master.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ entity wishbone_master is
end entity;

architecture a of wishbone_master is
constant rd_request_queue : queue_t := new_queue;
constant wr_request_queue : queue_t := new_queue;
constant acknowledge_queue : queue_t := new_queue;
constant bus_ack_msg : msg_type_t := new_msg_type("wb master ack msg");
constant wb_master_ack_actor : actor_t := new_actor;
signal start_cycle : std_logic := '0';
signal end_cycle : std_logic := '0';
Expand Down Expand Up @@ -109,10 +106,7 @@ begin
end process;

p_cycle : process
variable request_msg : msg_t;
variable ack_msg : msg_t;
variable pending : natural := 0;
variable received_acks : natural := 0;
begin
cyc <= '0';
cycle <= false;
Expand All @@ -139,7 +133,7 @@ begin
end process;

acknowledge : process
variable request_msg, reply_msg, ack_msg : msg_t;
variable request_msg, reply_msg : msg_t;
begin
wait until ack = '1' and rising_edge(clk);
request_msg := pop(acknowledge_queue);
Expand Down
3 changes: 0 additions & 3 deletions vunit/vhdl/verification_components/test/tb_avalon_slave.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ architecture a of tb_avalon_slave is

constant tb_logger : logger_t := get_logger("tb");

signal wr_ack_cnt : natural range 0 to tb_cfg.num_cycles;
signal rd_ack_cnt : natural range 0 to tb_cfg.num_cycles;

constant memory : memory_t := new_memory;
Expand All @@ -72,8 +71,6 @@ architecture a of tb_avalon_slave is
begin

main_stim : process
variable tmp : std_logic_vector(writedata'range);
variable value : std_logic_vector(writedata'range) := (others => '1');
begin
test_runner_setup(runner, runner_cfg);
set_format(display_handler, verbose, true);
Expand Down
2 changes: 0 additions & 2 deletions vunit/vhdl/verification_components/test/tb_wishbone_slave.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ architecture a of tb_wishbone_slave is
begin

main_stim : process
variable tmp : std_logic_vector(dat_i'range);
variable value : std_logic_vector(dat_i'range) := (others => '1');
begin
test_runner_setup(runner, runner_cfg);
set_format(display_handler, verbose, true);
Expand Down

0 comments on commit c16718d

Please sign in to comment.