[Cryptech-Commits] [user/js/keywrap] branch increase_api_addr_space updated: Updated testbench to handle parameterized core.
git at cryptech.is
git at cryptech.is
Tue Sep 4 11:18:18 UTC 2018
This is an automated email from the git hooks/post-receive script.
joachim at secworks.se pushed a commit to branch increase_api_addr_space
in repository user/js/keywrap.
The following commit(s) were added to refs/heads/increase_api_addr_space by this push:
new 2fb042d Updated testbench to handle parameterized core.
2fb042d is described below
commit 2fb042d7158d4bd5315ef7b716334a7f45aa0928
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Tue Sep 4 13:17:56 2018 +0200
Updated testbench to handle parameterized core.
---
src/tb/tb_keywrap_core.v | 47 ++++++++++++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 19 deletions(-)
diff --git a/src/tb/tb_keywrap_core.v b/src/tb/tb_keywrap_core.v
index 8d055fe..17c8f30 100644
--- a/src/tb/tb_keywrap_core.v
+++ b/src/tb/tb_keywrap_core.v
@@ -42,38 +42,47 @@ module tb_keywrap_core();
//----------------------------------------------------------------
// Parameters.
//----------------------------------------------------------------
+ parameter DEBUG = 1;
+
parameter CLK_HALF_PERIOD = 1;
parameter CLK_PERIOD = 2 * CLK_HALF_PERIOD;
+ parameter API_ADDR_BITS = 8;
+ parameter RLEN_BITS = API_ADDR_BITS - 1;
+ parameter CORE_ADDR_BITS = API_ADDR_BITS - 1;
+ parameter API_ADDR_MAX = (2 ** API_ADDR_BITS) - 1;
+ parameter CORE_ADDR_MAX = (2 ** CORE_ADDR_BITS) - 1;
//----------------------------------------------------------------
// Variables, regs and wires.
//----------------------------------------------------------------
integer cycle_ctr;
-
- reg tb_clk;
- reg tb_reset_n;
-
- reg tb_init;
- reg tb_next;
- reg tb_encdec;
- wire tb_ready;
- wire tb_valid;
- reg [12 : 0] tb_rlen;
- reg [255 : 0] tb_key;
- reg tb_keylen;
- reg [63 : 0] tb_a_init;
- wire [63 : 0] tb_a_result;
- reg tb_api_we;
- reg [13 : 0] tb_api_addr;
- reg [31 : 0] tb_api_wr_data;
- wire [31 : 0] tb_api_rd_data;
+ reg [31 : 0] error_ctr;
+ reg [31 : 0] tc_ctr;
+
+ reg tb_clk;
+ reg tb_reset_n;
+ reg tb_init;
+ reg tb_next;
+ reg tb_encdec;
+ wire tb_ready;
+ wire tb_valid;
+ reg [(RLEN_BITS - 1) : 0] tb_rlen;
+ reg [255 : 0] tb_key;
+ reg tb_keylen;
+ reg [63 : 0] tb_a_init;
+ wire [63 : 0] tb_a_result;
+ reg tb_api_we;
+ reg [(API_ADDR_BITS - 1) : 0] tb_api_addr;
+ reg [31 : 0] tb_api_wr_data;
+ wire [31 : 0] tb_api_rd_data;
//----------------------------------------------------------------
// Device Under Test.
//----------------------------------------------------------------
- keywrap_core dut(
+ keywrap_core #(.MEM_BITS(API_ADDR_BITS))
+ dut(
.clk(tb_clk),
.reset_n(tb_reset_n),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list