alu 8 bit multiplier

Discussion in 'General Electronics Chat' started by hassan maysara, Apr 7, 2013.

Thread Status:
Not open for further replies.
  1. hassan maysara

    Thread Starter New Member

    Oct 23, 2012
    14
    0
    I want a 8 bit multiplier circuit which takes the least time to operate regardless of the area. I want new ideas
    thanks in advance
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    You can make all the steps in parallel, i.e. 8 ANDs enabling the rows and ~64 adders to add the rows up. But I am not too sure it will be faster than the typical add-shift 8 clock cycle multiplication, because the total propagation delay might higher than 8 times the shorter PD of the single stage.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    The fastest 8x8 multiply would be a lookup table using a 64k x 16-bit ROM.
    Perfectly doable.
     
    absf likes this.
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,680
    2,741
    Here's an experimental 8x8 multiplier I developed many years ago in the Abel language (for a PAL, or PLD, or CPLD, or something!). It's all combinatorial, so there is no clock. Speed is dependent upon propagation delay. It simulated properly, though never tried to load it into actual silicon.

    To be honest, I don't really remember how it works, except that it is based on sums of 1 bit products.

    I also don't know why there are two version of the line:

    Code ( (Unknown Language)):
    1.  
    2. "  t1 = [0,p10] + [0,p01];
    3.   t1 = [0, y1 & x0] + [0, y0 & x1];
    4.  
    with one commented out.

    Code ( (Unknown Language)):
    1.  
    2. module mult
    3.  
    4. title '8x8 Multiplier
    5. JoeyD999  Circa 1995'
    6.  
    7. "mult device 'p26cv12';
    8.  
    9. @Dcset
    10.  
    11. declarations
    12.  
    13.   "inputs
    14.  
    15.    x7, x6, x5, x4, x3, x2, x1, x0 pin;
    16.    y7, y6, y5, y4, y3, y2, y1, y0 pin;
    17.  
    18.   "outputs
    19.  
    20.    sf, se, sd, sc,sb, sa, s9, s8 pin istype 'com';
    21.    s7, s6, s5, s4,s3, s2, s1, s0 pin istype 'com';
    22.  
    23.   "internal
    24.  
    25.    p00, p01, p02, p03   pin istype 'com';
    26.    p04, p05, p06, p07   pin istype 'com';
    27.  
    28.    p10, p11, p12, p13   pin istype 'com';
    29.    p14, p15, p16, p17   pin istype 'com';
    30.  
    31.    p20, p21, p22, p23   pin istype 'com';
    32.    p24, p25, p26, p27   pin istype 'com';
    33.  
    34.    p30, p31, p32, p33   pin istype 'com';
    35.    p34, p35, p36, p37   pin istype 'com';
    36.  
    37.    p40, p41, p42, p43   pin istype 'com';
    38.    p44, p45, p46, p47   pin istype 'com';
    39.  
    40.    p50, p51, p52, p53   pin istype 'com';
    41.    p54, p55, p56, p57   pin istype 'com';
    42.  
    43.    p60, p61, p62, p63   pin istype 'com';
    44.    p64, p65, p66, p67   pin istype 'com';
    45.  
    46.    p70, p71, p72, p73   pin istype 'com';
    47.    p74, p75, p76, p77   pin istype 'com';
    48.  
    49.    c10                  pin istype 'com';
    50.    c20, c21             pin istype 'com';
    51.    c30, c31             pin istype 'com';
    52.    c40, c41             pin istype 'com';
    53.    c50, c51, c52        pin istype 'com';
    54.    c60, c61, c62        pin istype 'com';
    55.    c70, c71, c72        pin istype 'com';
    56.    c80, c81, c82        pin istype 'com';
    57.    c90, c91, c92        pin istype 'com';
    58.    ca0, ca1, ca2        pin istype 'com';
    59.    cb0, cb1             pin istype 'com';
    60.    cc0, cc1             pin istype 'com';
    61.    cd0, cd1             pin istype 'com';
    62.    ce0                  pin istype 'com';
    63.  
    64.  
    65.   x = [x7, x6, x5, x4, x3, x2, x1, x0];
    66.   y = [y7, y6, y5, y4, y3, y2, y1, y0];
    67.   s = [sf, se, sd, sc, sb, sa, s9, s8, s7, s6, s5, s4, s3, s2, s1, s0];
    68.  
    69.   p0 = [p70, p60, p50, p40, p30, p20, p10, p00];
    70.   p1 = [p71, p61, p51, p41, p31, p21, p11, p01];
    71.   p2 = [p72, p62, p52, p42, p32, p22, p12, p02];
    72.   p3 = [p73, p63, p53, p43, p33, p23, p13, p03];
    73.   p4 = [p74, p64, p54, p44, p34, p24, p14, p04];
    74.   p5 = [p75, p65, p55, p45, p35, p25, p15, p05];
    75.   p6 = [p76, p66, p56, p46, p36, p26, p16, p06];
    76.   p7 = [p77, p67, p57, p47, p37, p27, p17, p07];
    77.  
    78.   t0 = [s0];
    79.   t1 = [c10, s1];
    80.   t2 = [c21, c20, s2];
    81.   t3 = [c31, c30, s3];
    82.   t4 = [c41, c40, s4];
    83.   t5 = [c52, c51, c50, s5];
    84.   t6 = [c62, c61, c60, s6];
    85.   t7 = [c72, c71, c70, s7];
    86.   t8 = [c82, c81, c80, s8];
    87.   t9 = [c92, c91, c90, s9];
    88.   ta = [ca2, ca1, ca0, sa];
    89.   tb = [cb1, cb0, sb];
    90.   tc = [cc1, cc0, sc];
    91.   td = [cd1, cd0, sd];
    92.   te = [ce0, se];
    93.   tf = [sf];
    94.  
    95. equations
    96.  
    97.   p0 = x & y0;
    98.   p1 = x & y1;
    99.   p2 = x & y2;
    100.   p3 = x & y3;
    101.   p4 = x & y4;
    102.   p5 = x & y5;
    103.   p6 = x & y6;
    104.   p7 = x & y7;
    105.  
    106.   t0 = p00;
    107. "  t1 = [0,p10] + [0,p01];
    108.   t1 = [0, y1 & x0] + [0, y0 & x1];
    109.   t2 = [0,0,p20] + [0,0,p11] + [0,0,p02] + [0,0,c10];
    110.   t3 = [0,0,p30] + [0,0,p21] + [0,0,p12] + [0,0,p03] + [0,0,c20];
    111.   t4 = [0,0,p40] + [0,0,p31] + [0,0,p22] + [0,0,p13] + [0,0,p04] + [0,0,c21] + [0,0,c30];
    112.   t5 = [0,0,0,p50] + [0,0,0,p41] + [0,0,0,p32] + [0,0,0,p23] + [0,0,0,p14] + [0,0,0,p05] + [0,0,0,c31] + [0,0,0,c40];
    113.   t6 = [0,0,0,p60] + [0,0,0,p51] + [0,0,0,p42] + [0,0,0,p33] + [0,0,0,p24] + [0,0,0,p15] + [0,0,0,p06] + [0,0,0,c41] + [0,0,0,c50];
    114.   t7 = [0,0,0,p70] + [0,0,0,p61] + [0,0,0,p52] + [0,0,0,p43] + [0,0,0,p34] + [0,0,0,p25] + [0,0,0,p16] + [0,0,0,p07] + [0,0,0,c51] + [0,0,0,c60];
    115.   t8 = [0,0,0,p71] + [0,0,0,p62] + [0,0,0,p53] + [0,0,0,p44] + [0,0,0,p35] + [0,0,0,p26] + [0,0,0,p17] + [0,0,0,c52] + [0,0,0,c61] + [0,0,0,c70];
    116.   t9 = [0,0,0,p72] + [0,0,0,p63] + [0,0,0,p54] + [0,0,0,p45] + [0,0,0,p36] + [0,0,0,p27] + [0,0,0,c62] + [0,0,0,c71] + [0,0,0,c80];
    117.   ta = [0,0,0,p73] + [0,0,0,p64] + [0,0,0,p55] + [0,0,0,p46] + [0,0,0,p37] + [0,0,0,c72] + [0,0,0,c81] + [0,0,0,c90];
    118.   tb = [0,0,p74] + [0,0,p65] + [0,0,p56] + [0,0,p47] + [0,0,c82] + [0,0,c91] + [0,0,ca0];          
    119.   tc = [0,0,p75] + [0,0,p66] + [0,0,p57] + [0,0,c92] + [0,0,ca1] + [0,0,cb0];
    120.   td = [0,0,p76] + [0,0,p67] + [0,0,ca2] + [0,0,cb1] + [0,0,cc0];
    121.   te = [0,p77] + [0,cc1] + [0,cd0];            
    122.   tf = [cd1] + [ce0];
    123.  
    124. test_vectors
    125.  
    126.   ([x, y]  -> s);
    127.    [0, 0]  -> 0;
    128.    [0, 1]  -> 0;
    129.    [1, 1]  -> 1;
    130.    [2, 3]  -> 6;
    131.    [255, 255] -> 65025;
    132.    [34, 231] -> 7854;
    133.  
    134. end
    135.  
     
  5. hassan maysara

    Thread Starter New Member

    Oct 23, 2012
    14
    0
    MrChips can you give me more details about using rom in multiplier because it's a new idea to me all my small experience is how to reduce the levels of adders
     
  6. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    You simply calculate all the products beforehand, program them into the ROM or hardwire into an ASIC and then only read the apropriate address to get the result instantly.
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    8x8 integer multiplication will give an integer result that does not exceed 16 bits.

    The maximum result will be

    255 x 255 = 65025

    For every pair of numbers to be multiplied, there is an exact solution

    A x B = R

    There are 256 possible values of A, ranging from 0 to 255.
    Similarly there are 256 possible values of B, ranging from 0 to 255.
    A and B concatenated (joined together) will create a 16-word which is used as an address to a memory chip. A memory with a 16-bit address would have 65536 locations. We make the data word of the memory chip to be 16 bits wide. That is, there are 65536 locations of 16-bit data stored in the memory, i.e. a 64k 16-bit ROM.

    The access time of the memory will determine the speed of the multiplication. ROMs with access times of 45ns are readily available.

    AT27C1024 is a 64k x 16 EPROM and sells for $3.
     
  8. hassan maysara

    Thread Starter New Member

    Oct 23, 2012
    14
    0
    Sorry but dadda' delay is about 2.56n so does using Rom in multiplier useful?? In general the Ic is not available here but does this Ic http://www.ram-e-shop.com/ds/ic/24C512.pdf the same? but it works on 1mhz and serial input so dose the delay become 5(your ic 5 mhz)*8(serial input) times of 45 ns and another question does writing to the rom made by computer code and burner if right this is out of my study until this time because I am in the 1st year
    Big thank to Mr MrChips and others
     
  9. hassan maysara

    Thread Starter New Member

    Oct 23, 2012
    14
    0
  10. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
  11. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    I have a few tubes of those chips with quartz windows from a scrapped project.

    The OTP version in E14 is almost the same price as the OTP EPROM 27C512 (64Kx8). You can use 2x 27C512 to get the 16 bit wide data as not all eprom programmers can support 16 bit data width.;)

    Allen
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,746
    4,795
    I don't know that this is the case. ROMs (any memory, really) are relatively slow compared to combinatorial logic elements.

    A Google search just for "8x8 multiplier" brought up Wallace tree adders that will do 8x8 multiplies in under 10ns.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,746
    4,795
    If you want a fast LUT approach, load the table into SRAM.

    As is so often the case, the specs are lacking. Are you looking for a solution that can be done with off-the-shelf chips? Are you willing to fabricate an ASIC? Is power a consideration?
     
  14. Steven Stanley Bayes

    New Member

    Dec 23, 2014
    4
    0
  15. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Welcome to AAC.

    Congratulations, you have practiced the arcane art of necromancy, the revival of a long dead thread. Likely the OP (Original Poster) has solved his problem in the years that has passed, or thrown it away, or something.
     
    kubeek likes this.
Loading...
Thread Status:
Not open for further replies.