1 |
221 |
olivier.gi |
//Legal Notice: (C)2014 Altera Corporation. All rights reserved. Your
|
2 |
|
|
//use of Altera Corporation's design tools, logic functions and other
|
3 |
|
|
//software and tools, and its AMPP partner logic functions, and any
|
4 |
|
|
//output files any of the foregoing (including device programming or
|
5 |
|
|
//simulation files), and any associated documentation or information are
|
6 |
|
|
//expressly subject to the terms and conditions of the Altera Program
|
7 |
|
|
//License Subscription Agreement or other applicable license agreement,
|
8 |
|
|
//including, without limitation, that your use is for the sole purpose
|
9 |
|
|
//of programming logic devices manufactured by Altera and sold by Altera
|
10 |
|
|
//or its authorized distributors. Please refer to the applicable
|
11 |
|
|
//agreement for further details.
|
12 |
|
|
|
13 |
|
|
// synthesis translate_off
|
14 |
|
|
`timescale 1ns / 1ps
|
15 |
|
|
// synthesis translate_on
|
16 |
|
|
|
17 |
|
|
// turn off superfluous verilog processor warnings
|
18 |
|
|
// altera message_level Level1
|
19 |
|
|
// altera message_off 10034 10035 10036 10037 10230 10240 10030
|
20 |
|
|
|
21 |
|
|
module DE0_NANO_SOC_QSYS_nios2_qsys_mult_cell (
|
22 |
|
|
// inputs:
|
23 |
|
|
A_mul_src1,
|
24 |
|
|
A_mul_src2,
|
25 |
|
|
clk,
|
26 |
|
|
reset_n,
|
27 |
|
|
|
28 |
|
|
// outputs:
|
29 |
|
|
A_mul_cell_result
|
30 |
|
|
)
|
31 |
|
|
;
|
32 |
|
|
|
33 |
|
|
output [ 31: 0] A_mul_cell_result;
|
34 |
|
|
input [ 31: 0] A_mul_src1;
|
35 |
|
|
input [ 31: 0] A_mul_src2;
|
36 |
|
|
input clk;
|
37 |
|
|
input reset_n;
|
38 |
|
|
|
39 |
|
|
wire [ 31: 0] A_mul_cell_result;
|
40 |
|
|
wire [ 31: 0] A_mul_cell_result_part_1;
|
41 |
|
|
wire [ 15: 0] A_mul_cell_result_part_2;
|
42 |
|
|
wire mul_clr;
|
43 |
|
|
assign mul_clr = ~reset_n;
|
44 |
|
|
altera_mult_add the_altmult_add_part_1
|
45 |
|
|
(
|
46 |
|
|
.aclr0 (mul_clr),
|
47 |
|
|
.clock0 (clk),
|
48 |
|
|
.dataa (A_mul_src1[15 : 0]),
|
49 |
|
|
.datab (A_mul_src2[15 : 0]),
|
50 |
|
|
.ena0 (1'b1),
|
51 |
|
|
.result (A_mul_cell_result_part_1)
|
52 |
|
|
);
|
53 |
|
|
|
54 |
|
|
defparam the_altmult_add_part_1.addnsub_multiplier_pipeline_aclr1 = "ACLR0",
|
55 |
|
|
the_altmult_add_part_1.addnsub_multiplier_pipeline_register1 = "CLOCK0",
|
56 |
|
|
the_altmult_add_part_1.addnsub_multiplier_register1 = "UNREGISTERED",
|
57 |
|
|
the_altmult_add_part_1.dedicated_multiplier_circuitry = "YES",
|
58 |
|
|
the_altmult_add_part_1.input_register_a0 = "UNREGISTERED",
|
59 |
|
|
the_altmult_add_part_1.input_register_b0 = "UNREGISTERED",
|
60 |
|
|
the_altmult_add_part_1.input_source_a0 = "DATAA",
|
61 |
|
|
the_altmult_add_part_1.input_source_b0 = "DATAB",
|
62 |
|
|
the_altmult_add_part_1.lpm_type = "altera_mult_add",
|
63 |
|
|
the_altmult_add_part_1.multiplier1_direction = "ADD",
|
64 |
|
|
the_altmult_add_part_1.multiplier_aclr0 = "ACLR0",
|
65 |
|
|
the_altmult_add_part_1.multiplier_register0 = "CLOCK0",
|
66 |
|
|
the_altmult_add_part_1.number_of_multipliers = 1,
|
67 |
|
|
the_altmult_add_part_1.output_register = "UNREGISTERED",
|
68 |
|
|
the_altmult_add_part_1.port_addnsub1 = "PORT_UNUSED",
|
69 |
|
|
the_altmult_add_part_1.port_addnsub3 = "PORT_UNUSED",
|
70 |
|
|
the_altmult_add_part_1.port_signa = "PORT_UNUSED",
|
71 |
|
|
the_altmult_add_part_1.port_signb = "PORT_UNUSED",
|
72 |
|
|
the_altmult_add_part_1.representation_a = "UNSIGNED",
|
73 |
|
|
the_altmult_add_part_1.representation_b = "UNSIGNED",
|
74 |
|
|
the_altmult_add_part_1.selected_device_family = "CYCLONEV",
|
75 |
|
|
the_altmult_add_part_1.signed_pipeline_aclr_a = "ACLR0",
|
76 |
|
|
the_altmult_add_part_1.signed_pipeline_aclr_b = "ACLR0",
|
77 |
|
|
the_altmult_add_part_1.signed_pipeline_register_a = "CLOCK0",
|
78 |
|
|
the_altmult_add_part_1.signed_pipeline_register_b = "CLOCK0",
|
79 |
|
|
the_altmult_add_part_1.signed_register_a = "UNREGISTERED",
|
80 |
|
|
the_altmult_add_part_1.signed_register_b = "UNREGISTERED",
|
81 |
|
|
the_altmult_add_part_1.width_a = 16,
|
82 |
|
|
the_altmult_add_part_1.width_b = 16,
|
83 |
|
|
the_altmult_add_part_1.width_result = 32;
|
84 |
|
|
|
85 |
|
|
altera_mult_add the_altmult_add_part_2
|
86 |
|
|
(
|
87 |
|
|
.aclr0 (mul_clr),
|
88 |
|
|
.clock0 (clk),
|
89 |
|
|
.dataa (A_mul_src1[31 : 16]),
|
90 |
|
|
.datab (A_mul_src2[15 : 0]),
|
91 |
|
|
.ena0 (1'b1),
|
92 |
|
|
.result (A_mul_cell_result_part_2)
|
93 |
|
|
);
|
94 |
|
|
|
95 |
|
|
defparam the_altmult_add_part_2.addnsub_multiplier_pipeline_aclr1 = "ACLR0",
|
96 |
|
|
the_altmult_add_part_2.addnsub_multiplier_pipeline_register1 = "CLOCK0",
|
97 |
|
|
the_altmult_add_part_2.addnsub_multiplier_register1 = "UNREGISTERED",
|
98 |
|
|
the_altmult_add_part_2.dedicated_multiplier_circuitry = "YES",
|
99 |
|
|
the_altmult_add_part_2.input_register_a0 = "UNREGISTERED",
|
100 |
|
|
the_altmult_add_part_2.input_register_b0 = "UNREGISTERED",
|
101 |
|
|
the_altmult_add_part_2.input_source_a0 = "DATAA",
|
102 |
|
|
the_altmult_add_part_2.input_source_b0 = "DATAB",
|
103 |
|
|
the_altmult_add_part_2.lpm_type = "altera_mult_add",
|
104 |
|
|
the_altmult_add_part_2.multiplier1_direction = "ADD",
|
105 |
|
|
the_altmult_add_part_2.multiplier_aclr0 = "ACLR0",
|
106 |
|
|
the_altmult_add_part_2.multiplier_register0 = "CLOCK0",
|
107 |
|
|
the_altmult_add_part_2.number_of_multipliers = 1,
|
108 |
|
|
the_altmult_add_part_2.output_register = "UNREGISTERED",
|
109 |
|
|
the_altmult_add_part_2.port_addnsub1 = "PORT_UNUSED",
|
110 |
|
|
the_altmult_add_part_2.port_addnsub3 = "PORT_UNUSED",
|
111 |
|
|
the_altmult_add_part_2.port_signa = "PORT_UNUSED",
|
112 |
|
|
the_altmult_add_part_2.port_signb = "PORT_UNUSED",
|
113 |
|
|
the_altmult_add_part_2.representation_a = "UNSIGNED",
|
114 |
|
|
the_altmult_add_part_2.representation_b = "UNSIGNED",
|
115 |
|
|
the_altmult_add_part_2.selected_device_family = "CYCLONEV",
|
116 |
|
|
the_altmult_add_part_2.signed_pipeline_aclr_a = "ACLR0",
|
117 |
|
|
the_altmult_add_part_2.signed_pipeline_aclr_b = "ACLR0",
|
118 |
|
|
the_altmult_add_part_2.signed_pipeline_register_a = "CLOCK0",
|
119 |
|
|
the_altmult_add_part_2.signed_pipeline_register_b = "CLOCK0",
|
120 |
|
|
the_altmult_add_part_2.signed_register_a = "UNREGISTERED",
|
121 |
|
|
the_altmult_add_part_2.signed_register_b = "UNREGISTERED",
|
122 |
|
|
the_altmult_add_part_2.width_a = 16,
|
123 |
|
|
the_altmult_add_part_2.width_b = 16,
|
124 |
|
|
the_altmult_add_part_2.width_result = 16;
|
125 |
|
|
|
126 |
|
|
assign A_mul_cell_result = {A_mul_cell_result_part_1[31 : 16] +
|
127 |
|
|
A_mul_cell_result_part_2,
|
128 |
|
|
A_mul_cell_result_part_1[15 : 0]};
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
endmodule
|
132 |
|
|
|