diff options
author | Paul Selkirk <paul@psgd.org> | 2014-11-18 15:21:57 -0500 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2014-11-18 15:21:57 -0500 |
commit | 27b2a6f9f52ce3a58354a104157013abfed30110 (patch) | |
tree | d3d7b89aaabe2e3ffe647e984075e0d345e2fa14 | |
parent | c0153c65d55f7b47dc6e94a3ce7b33daec95592d (diff) |
i2c_device_addr as output
-rw-r--r-- | src/rtl/coretest_hashes.v | 5 |
1 files changed, 4 insertions, 1 deletions
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 |