
8.7 Custom Data Interfaces 205
instructions.The primary advantage of this implementation is the reduced hardware
cost, and the disadvantage is the fact that the same instruction cannot be issued at
every cycle.
The following example illustrates a vector dot product computation imple-
mented using a single multiplier:
function [31:0] mul16 ([15:0] a, [15:0] b, signed) shared {
assign mul16 = TIEmul(a,b,signed);
}
operation VDOTPROD {out AR acc, in AR m0, in AR m1} {
wire [31:0] prod0 = mul16(m0[15: 0], m1[15: 0], 1’b1);
wire [31:0] prod1 = mul16(m0[31:16], m1[31:16], 1’b1);
assign acc = prod0 + prod1;
}
schedule dotprod {VDOTPROD} { def acc Estage + 2; }