Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21344 Discussions

Calculation of Number of embedded multiplier

Altera_Forum
Honored Contributor II
958 Views

Operation: z<= a*b; 

 

Therer are 2 cases below and I need someone to explain on how the number below obtained. Pls explain the reason there are uses of mixed sign, unsigned and signed multiplier since this is just a signed operation. thanks 

 

 

Case1: 

input signed [31:0] b; 

input signed [31:0] a; 

(*multstyle = "dsp"*) output reg signed [63:0]z; 

 

Simple Multipliers (9-bit) 0 

Simple Multipliers (18-bit) 4 

Embedded Multiplier Blocks -- 

Embedded Multiplier 9-bit elements 8 

Signed Embedded Multipliers 1 

Unsigned Embedded Multipliers 1 

Mixed Sign Embedded Multipliers 2 

Variable Sign Embedded Multipliers 0 

Dedicated Input Shift Register Chains 0 

 

 

Case2 

 

 

input signed [31:0] b; 

input signed [31:0] a; 

(*multstyle = "dsp"*) output reg signed [31:0]z; 

 

Simple Multipliers (9-bit) 0 

Simple Multipliers (18-bit) 3 

Embedded Multiplier Blocks -- 

Embedded Multiplier 9-bit elements 6 

Signed Embedded Multipliers 0 

Unsigned Embedded Multipliers 1 

Mixed Sign Embedded Multipliers 2 

Variable Sign Embedded Multipliers 0 

Dedicated Input Shift Register Chains 0
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
263 Views

Since the device's multipliers can only handle 18x18 multiplications, larger multiplications are implemented using several partial multiplications, like you learned in school. 

 

Thus, a full 32x32 multiplication requires 4 partial multiplcations. And since the signal is in the MSB, the other parts are handled as unsigned. 

1st a[17:0] * b [17:0] - unsigned * unsigned 

2nd a[31:18] * b [17:0] - signed * unsigned 

3rd a[17:0] * b [31:18] - unsigned * signed 

4th a[31:18] * b [31:18] - signed * signed 

 

Thus, the mix you're seeing in the report. 

 

As for case 2, since you're only keeping the result's 32 LSBs, the 4th term isn't needed.
0 Kudos
Reply