Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

How to Design a Multiplier Circuit using AHDL?

Hi all:

I have a multiplier circuit built using Multisim and I suppoosed to use AHDL to implement the circuit. Problem is, I don't know where to begin and how to actually use the circuit. Here are the design parameters and the algorithms that I have.

Please the attached file. This is where I am getting stuck at. How do I actually write this into code?

Lew

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Step 1: Go to your tutor and tell him that AHDL is an old and unsupported language. From Quarus 10 you wont be able to simulate it at all.

    Step 2: Do it in a more modern HDL like VHDL or Verilog that are IEEE standard, not proprietry, languages.

    Otherwise:

    
    MultiplierA :    lpm_mult    WITH (    LPM_WIDTHA                                = 2 , 
                                                LPM_WIDTHB                                 = 2 ,
                                                LPM_WIDTHP                                 = 4 ,
                                                LPM_WIDTHS                                 = 1 ,
                                                LPM_REPRESENTATION                         = "UNSIGNED" ,
                                                LPM_PIPELINE                             = 1 ,
                                                INPUT_A_IS_CONSTANT                     = "NO" ,
                                                INPUT_B_IS_CONSTANT                     = "NO" ,
                                                USE_EAB                                     = "OFF"  ,
                                                DEDICATED_MULTIPLIER_CIRCUITRY             = "YES"
                                            ) ;
    MultiplierA.clock = clk;
    MultiplierA.clken = VCC;
    MultiplierA.dataa = input1;
    MultiplierA.datab = input2;
    output = MultiplierA.result;
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Understable Tricky,

    However, these projects are for Digital Systems class and I think the purpose here is to get the understanding of PLD's and Programming down-packed. Not to actually use in a system. Can you explain what the device family is supposed to mean and how do you know which family and device to use with a particular circuit?

    LEW
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The device family is the chip you chose. And which chip you chose really depends on application.

    If you want millions of gates and high-speed coms, you got for a stratix 4 ($thousands), if you need something cheap that can still do plenty you go for a cyclone 3 ($hundreds).

    With modern devices as they all have plenty of memory and embedded multipliers, there are only 2 main deciding factors

    1. Cost

    2. Comms required

    I get the feeling the question is aimed at much more outdated technology though.