From 5a0a6f87f2f63f9f1044725db0cac212c63f1fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Mon, 22 Jun 2015 22:12:20 +0200 Subject: Changed blockmem1r1w used in montprod to generic data and address widths. Updated instantiation to use generics. --- src/rtl/montprod.v | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/rtl/montprod.v') diff --git a/src/rtl/montprod.v b/src/rtl/montprod.v index 0bfd3c8..465fa38 100644 --- a/src/rtl/montprod.v +++ b/src/rtl/montprod.v @@ -4,7 +4,7 @@ // --------- // Montgomery product calculator for the modular exponentiantion core. // -// paremeter OPW is operand word width in bits. +// parameter OPW is operand word width in bits. // parameter ADW is address width in bits. // // @@ -186,15 +186,14 @@ module montprod #(parameter OPW = 32, parameter ADW = 8) //---------------------------------------------------------------- // Instantions //---------------------------------------------------------------- - blockmem1r1w s_mem( - .clk(clk), - .read_addr(s_mem_addr), - .read_data(s_mem_read_data), - .wr(s_mem_we_reg), - .write_addr(s_mem_wr_addr_reg), - .write_data(s_mem_new) - ); - + blockmem1r1w #(.OPW(OPW), .ADW(ADW)) s_mem( + .clk(clk), + .read_addr(s_mem_addr), + .read_data(s_mem_read_data), + .wr(s_mem_we_reg), + .write_addr(s_mem_wr_addr_reg), + .write_data(s_mem_new) + ); adder32 s_adder_sm( .a(muxed_s_mem_read_data), -- cgit v1.2.3