From a62861f3c91e88020d2c54e6500f431b9edde1d8 Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Sat, 1 Jul 2017 20:11:20 +0300 Subject: Added generic/vendor-specific primitive selector for simulation. --- src/rtl/pe/modexpa7_pe_add.v | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src/rtl/pe/modexpa7_pe_add.v') diff --git a/src/rtl/pe/modexpa7_pe_add.v b/src/rtl/pe/modexpa7_pe_add.v index 9cde591..467be5d 100644 --- a/src/rtl/pe/modexpa7_pe_add.v +++ b/src/rtl/pe/modexpa7_pe_add.v @@ -47,14 +47,27 @@ module modexpa7_pe_add output c_out ); - reg [32: 0] s_reg; - assign s = s_reg[31: 0]; - assign c_out = s_reg[32]; - - always @(posedge clk) - // - if (ce) s_reg <= {1'b0, a} + {1'b0, b} + {32'd0, c_in}; + // + // Include Primitive Selector + // + `include "modexpa7_pe_settings.v" + + + // + // Instantiate Vendor/Generic Primitive + // + `ADDER32_PRIMITIVE adder32_inst + ( + .clk(clk), + .ce(ce), + .a(a), + .b(b), + .s(s), + .c_in(c_in), + .c_out(c_out) + ); + endmodule -- cgit v1.2.3