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_sub.v | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src/rtl/pe/modexpa7_pe_sub.v') diff --git a/src/rtl/pe/modexpa7_pe_sub.v b/src/rtl/pe/modexpa7_pe_sub.v index 85c5f65..2da4900 100644 --- a/src/rtl/pe/modexpa7_pe_sub.v +++ b/src/rtl/pe/modexpa7_pe_sub.v @@ -47,14 +47,27 @@ module modexpa7_pe_sub output b_out ); - reg [32: 0] d_reg; - assign d = d_reg[31: 0]; - assign b_out = d_reg[32]; - - always @(posedge clk) - // - if (ce) d_reg <= {1'b0, a} - {1'b0, b} - {32'd0, b_in}; + // + // Include Primitive Selector + // + `include "modexpa7_pe_settings.v" + + + // + // Instantiate Vendor/Generic Primitive + // + `SUBTRACTOR32_PRIMITIVE subtractor32_inst + ( + .clk(clk), + .ce(ce), + .a(a), + .b(b), + .d(d), + .b_in(b_in), + .b_out(b_out) + ); + endmodule -- cgit v1.2.3