[Cryptech-Commits] [test/novena_base] 01/01: Added real prefix detection of sha255 core.
git at cryptech.is
git at cryptech.is
Mon Feb 2 19:55:03 UTC 2015
This is an automated email from the git hooks/post-receive script.
joachim at secworks.se pushed a commit to branch sha256_core
in repository test/novena_base.
commit f1fe0708e988356413f3160c6a85dc8d82eba3a0
Author: Joachim Strömbergson <joachim at secworks.se>
Date: Mon Feb 2 20:54:59 2015 +0100
Added real prefix detection of sha255 core.
---
rtl/src/verilog/core_selector.v | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rtl/src/verilog/core_selector.v b/rtl/src/verilog/core_selector.v
index 7f92e43..092b8ca 100644
--- a/rtl/src/verilog/core_selector.v
+++ b/rtl/src/verilog/core_selector.v
@@ -48,12 +48,15 @@ module core_selector
input wire [31 : 0] write_data
);
+ parameter SHA256_BASE = 6'h14;
+ wire is_sha256 = ~(sys_eim_addr[13:8] ^ SHA256_BASE);
+ wire sha256_cs = (is_sha256 & sys_eim_rd) | (is_sha256 & sys_eim_wr);
sha256 sha256_inst(
.clk(sys_clk),
.reset_n(~sys_rst),
- .cs(sys_eim_rd | sys_eim_wr),
+ .cs(sha256_cs),
.we(sys_eim_wr),
.address(sys_eim_addr[7 : 0]),
More information about the Commits
mailing list