We can update you automatically when this page changes.
To receive regular notification of updates to our Model of the
Month section, click here.
This month we look at the design of a multiplier used in the receive path of a mobile digital communications system. The key feature of this multiplier is that the operands are of remarkably different wordlengths.
The multiplier is used in the synchronizer section of a system to maintain tracking between base stations. One aspect of the requirements for such a system is that the coefficients are often in the range -1 to +1, though a generous guard band is required to cater for extraordinary conditions (range -7 to +7). The data is required to maintain accuracy over many accumulations and under extraordinary conditions may grow to 22 bits. Thus a 22-bit by 4-bit signed multiplier design is required.
The multiplier is designed as a scaler rather than a typical multiplier. This is only feasible due to the short coefficient wordlength. In fact, designing a multiplier for a 5-bit coefficient yields better results when twin scalers feeding a common accumulator are used rather than a single scaler.
In order to ensure as fast a design as possible, the 4-bit signed coefficient input is recoded, as follows:
|
Obviously there is more than one recode value for some coefficient values (6 can be 8-2 or 4+2), so the recode values were chosen to maximize the symmetry in both the operator (+, -) and the recode operands. Maximizing symmetry minimizes the amount of hardware required for the recoding. Could this be an avenue of research worthy of exploration for synthesis optimization algorithms? Who knows! |
The advantage of recoding is that the multiplier design can now be realised as a pair of binary scalers (multiplexer-based shifters) feeding an adder-subtractor. Further investigation of the recoding shows that each binary scaler requires only 3 input values (corresponding to 0, 4, 8). The negative values (-1 to -8) require an extra negation, but fortunately in the context of the system, the accumulator following the scaler can be implemented as an adder-subtractor feeding the accumulating register. The scaler itself is thus VHDL-coded as a signed datapath scaler minus the negation stage, but with an output negate flag to control the following add-subtract accumulator.
There are no VHDL subtleties in this months model, just pure hardware design techniques!
You are welcome to use the source code we provide but you must keep the copyright notice with the code (see the Acknowledgements page for more details).
-- Synchronizer Scaler -- -- +-----------------------------+ -- | Copyright 1996 DOULOS | -- | Library : arithmetic | -- | designer : Tim Pagden | -- | opened: 30 Jul 1996 | -- +-----------------------------+ -- Architectures: -- 30.07.96 low_level library arithmetic; library multiplexer; architecture low_level of scaler_4s_22s_negate_out is use multiplexer.mux_3_25_cmpt.all; use arithmetic.adder_25_cmpt.all; signal a_shift_3 : std_ulogic_vector(24 downto 0); signal a_shift_2 : std_ulogic_vector(24 downto 0); signal a_shift_1 : std_ulogic_vector(24 downto 0); signal a_pass : std_ulogic_vector(24 downto 0); signal lo_25 : std_ulogic_vector(24 downto 0); signal sel_left : std_ulogic_vector(1 downto 0); signal sel_right : std_ulogic_vector(1 downto 0); signal left_shift_in : std_ulogic_vector(74 downto 0); signal right_shift_in : std_ulogic_vector(74 downto 0); signal left_shift_out : std_ulogic_vector(24 downto 0); signal right_shift_out : std_ulogic_vector(24 downto 0); signal right_shift_xor : std_ulogic_vector(24 downto 0); signal subtract : std_ulogic; begin sel_left_0: sel_left(0) <= b(2) xor b(1); sel_left_1: process (b(3 downto 1)) begin if b(3) = '0' then sel_left(1) <= b(2) and b(1); else sel_left(1) <= b(2) nor b(1); end if; end process; sel_right_0: sel_right(0) <= b(0); sel_right_1: sel_right(1) <= (not b(0)) and b(1); a3: a_shift_3 <= a & "000"; a2: a_shift_2 <= a(21) & a & "00"; a1: a_shift_1 <= a(21) & a(21) & a & '0'; ap: a_pass <= a(21) & a(21) & a(21) & a; lo: lo_25 <= (others => '0'); left_shift_in <= a_shift_3 & a_shift_2 & lo_25; right_shift_in <= a_shift_1 & a_pass & lo_25; subtract <= b(3) xor b(1); negate <= b(3); process (subtract, right_shift_out) begin if subtract = '0' then right_shift_xor <= right_shift_out; else right_shift_xor <= not right_shift_out; end if; end process; left_shifter: mux_3_25 port map ( a => left_shift_in, sel => sel_left, y => left_shift_out ); right_shifter: mux_3_25 port map ( a => right_shift_in, sel => sel_right, y => right_shift_out ); i0_0: adder_25 port map ( c_in => subtract, a => left_shift_out, b => right_shift_xor, y => y, c_out => open ); end low_level;
FPGA / ASIC Design and Project
Services
Doulos Training Courses
Copyright 1995-1997 Doulos
This page was last updated 27th August 1996
We welcome your e-mail comments. Please contact us at: webmaster@doulos.co.uk