HOME       UP       PREV       NEXT (Multiplier Answer (2))  

A Simple Worked Example: Classical HLS of Multiply

Take a non-rentrant function:

that achieves the same behaviour.
int multiply(int A, int B)
{ RA=A   // This is our source code
    if odd(RA) RC=RC+RB;
    RA = RA >> 1;
    RB = RB << 1;
  return RC;

This simple example has no multi-cycle primitives and a 1-to-1 mapping of ALUs to the source code text, so no schedulling was needed from the HLS tool.

Each register has a multiplexor that ranges over all the places it is loaded from.

We followed a syntax-directed approach with no search in the solution space for minimum clock cycles or minium area or maximum clock frequency.

The resulting block could serve as a primitive to be instantiated by an HLS tool. This example is not fully-pipelined and so typically would not be used for that purpose.

11: (C) 2012-17, DJ Greaves, University of Cambridge, Computer Laboratory.