From 27b2a6f9f52ce3a58354a104157013abfed30110 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 18 Nov 2014 15:21:57 -0500 Subject: i2c_device_addr as output --- src/rtl/coretest_hashes.v | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rtl/coretest_hashes.v b/src/rtl/coretest_hashes.v index 5076047..fc2ccff 100644 --- a/src/rtl/coretest_hashes.v +++ b/src/rtl/coretest_hashes.v @@ -55,6 +55,7 @@ module coretest_hashes( //---------------------------------------------------------------- // Internal constant and parameter definitions. //---------------------------------------------------------------- + parameter I2C_DEVICE_ADDR = 7'h0f; parameter I2C_ADDR_PREFIX = 8'h00; parameter SHA1_ADDR_PREFIX = 8'h10; parameter SHA256_ADDR_PREFIX = 8'h20; @@ -74,6 +75,7 @@ module coretest_hashes( reg coretest_error; // i2c connections + wire [6:0] i2c_device_addr; wire i2c_rxd_syn; wire [7 : 0] i2c_rxd_data; wire i2c_rxd_ack; @@ -155,7 +157,7 @@ module coretest_hashes( .SCL(SCL), .SDA(SDA), .SDA_pd(SDA_pd), - .i2c_device_addr(8'h1E), + .i2c_device_addr(i2c_device_addr), .rxd_syn(i2c_rxd_syn), .rxd_data(i2c_rxd_data), @@ -260,6 +262,7 @@ module coretest_hashes( sha512_write_data = 32'h00000000; + if (i2c_device_addr == I2C_DEVICE_ADDR) case (coretest_address[15 : 8]) I2C_ADDR_PREFIX: begin -- cgit v1.2.3