-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimize imports in an effort to lower simulation setup time
These changes represent a 21% reduction of execution time for the 460 test cases in hdl-modules repo: https://github.com/hdl-modules/hdl-modules For some small testbenches, the reduction is as much as 42%. Note that this repo contains only small to medium sized testbenches (1-10 seconds, with most around 1-4 seconds). This is all using the GHDL simulator with GCC backend on Linux. With ModelSim Intel FPGA starter edition 2020.1, the reductions is negligible (1-2%). This change: 1. Stop using "context" in all VUnit packages. In most packages, importing with context includes a lot more than what is actually used. 2. Stop using "use work.x_pkg.all" in cases where only 1-3 things are used from the package. Instead, one explicit "use" clause for the things that are actually used. * Not done for the most common packages (run_pkg, check_pkg, logger_pkg). * Not done for includes from very small packages. The first point represents roughly 80% of the performance gain. Note that in order to reach the performance gains listed above, the corresponding changes have to be made to all testbenches and simulation code in the user repo also. If the testbench includes "vunit_context", "com_context" etc, the performance gains will not be realized since everything will be imported anyway.
- Loading branch information
Showing
70 changed files
with
279 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
use ieee.numeric_std.all; | ||
use std.textio.all; | ||
use work.checker_pkg.all; | ||
use work.string_ops.all; | ||
use work.location_pkg.all; | ||
use work.integer_vector_ptr_pkg.all; | ||
|
||
package body check_pkg is | ||
type boolean_vector is array (natural range <>) of boolean; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,10 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
library vunit_lib; | ||
context vunit_lib.vunit_context; | ||
|
||
use std.textio.all; | ||
|
||
use work.string_ops.all; | ||
|
||
package com_debug_codec_builder_pkg is | ||
----------------------------------------------------------------------------- | ||
-- Encoding support | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,9 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
context work.vunit_context; | ||
use work.com_types_pkg.all; | ||
use work.logger_pkg.all; | ||
use work.string_ops.all; | ||
|
||
package com_support_pkg is | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
|
||
use work.stop_pkg; | ||
use work.integer_vector_ptr_pkg.all; | ||
use work.string_ptr_pkg.all; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
use ieee.math_complex.all; | ||
use ieee.numeric_bit.all; | ||
use ieee.numeric_std.all; | ||
|
||
use work.string_ptr_pkg.all; | ||
use work.string_ptr_pool_pkg.all; | ||
use work.integer_vector_ptr_pkg.all; | ||
use work.integer_vector_ptr_pool_pkg.all; | ||
use work.codec_pkg.all; | ||
use work.data_types_private_pkg.all; | ||
use work.queue_pkg.all; | ||
|
||
package body dict_pkg is | ||
constant int_pool : integer_vector_ptr_pool_t := new_integer_vector_ptr_pool; | ||
constant str_pool : string_ptr_pool_t := new_string_ptr_pool; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
use work.codec_pkg.all; | ||
use work.codec_builder_pkg.all; | ||
|
||
package body integer_array_pkg is | ||
type binary_file_t is file of character; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,10 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
|
||
use work.codec_builder_pkg.all; | ||
use work.codec_pkg.all; | ||
use work.integer_vector_ptr_pkg.all; | ||
|
||
package integer_array_pkg is | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
library ieee; | ||
use ieee.math_real.all; | ||
use ieee.math_complex.all; | ||
use work.codec_pkg.all; | ||
use work.codec_builder_pkg.all; | ||
|
||
package body queue_pkg is | ||
constant tail_idx : natural := 0; | ||
constant head_idx : natural := 1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,19 @@ | |
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
use ieee.math_complex.all; | ||
use ieee.math_real.all; | ||
use ieee.numeric_bit.all; | ||
use ieee.numeric_std.all; | ||
use ieee.std_logic_1164.all; | ||
|
||
use work.codec_builder_pkg.all; | ||
use work.codec_pkg.all; | ||
use work.data_types_private_pkg.data_type_t; | ||
use work.integer_array_pkg.integer_array_t; | ||
use work.integer_array_pkg.null_integer_array; | ||
use work.integer_vector_ptr_pkg.all; | ||
use work.string_ptr_pkg.all; | ||
use work.integer_array_pkg.all; | ||
use work.data_types_private_pkg.all; | ||
|
||
package queue_pkg is | ||
type queue_t is record | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,10 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
|
||
use work.string_ops.all; | ||
use work.logger_pkg.all; | ||
use std.textio.all; | ||
|
||
package dictionary is | ||
subtype frozen_dictionary_t is string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use work.ansi_pkg.all; | ||
use work.log_levels_pkg.all; | ||
use work.string_ops.upper; | ||
|
||
package body common_log_pkg is | ||
constant is_original_pkg : boolean := true; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
|
||
use work.integer_vector_ptr_pkg.all; | ||
use work.string_ptr_pkg.all; | ||
use work.common_log_pkg.all; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
|
||
library vunit_lib; | ||
use vunit_lib.string_ptr_pkg.all; | ||
use vunit_lib.integer_vector_ptr_pkg.all; | ||
|
||
use work.ansi_pkg.all; | ||
use work.string_ops.upper; | ||
use work.file_pkg.all; | ||
use work.common_log_pkg.all; | ||
|
||
package body log_handler_pkg is | ||
|
||
constant display_handler_id_number : natural := 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,15 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use std.textio.all; | ||
|
||
use work.ansi_pkg.all; | ||
use work.common_log_pkg.all; | ||
use work.file_pkg.all; | ||
use work.integer_vector_ptr_pkg.all; | ||
use work.log_levels_pkg.all; | ||
use work.string_ops.upper; | ||
use work.string_ptr_pkg.all; | ||
|
||
package log_handler_pkg is | ||
type deprecated_log_format_t is ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,6 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use work.string_ptr_pkg.all; | ||
use work.integer_vector_ptr_pkg.all; | ||
use work.core_pkg.all; | ||
|
||
package body log_levels_pkg is | ||
|
||
type levels_t is record | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ | |
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund [email protected] | ||
|
||
use work.string_ptr_pkg.all; | ||
use work.ansi_pkg.all; | ||
use work.core_pkg.all; | ||
use work.integer_vector_ptr_pkg.all; | ||
use work.string_ptr_pkg.all; | ||
|
||
package log_levels_pkg is | ||
|
||
|
Oops, something went wrong.