Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

Booth multiplier

Altera_Forum
Honored Contributor II
1,364 Views

Hey everyone, I have troubles with coding this 

Can somebody help me or did somebody this yet? 

 

Create and test the booth multiplier algorithm. The parameter should be the number of input operand bits 

 

thank you ! :)
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
677 Views

What problems are you having? why not let us help you rather than expecting other people do your work for you?

0 Kudos
Altera_Forum
Honored Contributor II
677 Views

 

--- Quote Start ---  

What problems are you having? why not let us help you rather than expecting other people do your work for you? 

--- Quote End ---  

 

 

 

Don't worry  

really don't know how to continue with that 

 

 

library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity RECODER is port ( DIN : in std_logic_vector(15 downto 0); BIT3 : in std_logic_vector( 2 downto 0); DOUT : out std_logic_vector(16 downto 0)); end RECODER; architecture RTL of RECODER is constant N : integer := 16; subtype bitn1 is std_logic_vector(N downto 0); function COMP2 (D : in bitn1) return bitn1 is variable Dn : bitn1; begin Dn := not D; return(Dn+1); end COMP2; begin process (DIN, BIT3) begin case BIT3 is when "001" | "010" => DOUT <= DIN(N-1) & DIN; when "101" | "110" => DOUT <= COMP2(DIN(N-1) & DIN); when "100" => DOUT <= COMP2(DIN & '0'); when "011" => DOUT <= DIN & '0'; when others => DOUT <= (DOUT'range => '0'); end case; end process; end RTL;
0 Kudos
Altera_Forum
Honored Contributor II
677 Views

And whats the problem?

0 Kudos
Altera_Forum
Honored Contributor II
677 Views

 

--- Quote Start ---  

And whats the problem? 

--- Quote End ---  

 

 

It doesn't work , don't know the problem  

so it for I asked if somebody did it ;)
0 Kudos
Altera_Forum
Honored Contributor II
677 Views

 

--- Quote Start ---  

It doesn't work , don't know the problem  

so it for I asked if somebody did it ;) 

--- Quote End ---  

 

 

So how does it 'not work'? Can you provide test case(s) showing inputs, received output, expected output? Do you have a test bench setup?
0 Kudos
Altera_Forum
Honored Contributor II
677 Views

 

--- Quote Start ---  

So how does it 'not work'? Can you provide test case(s) showing inputs, received output, expected output? Do you have a test bench setup? 

--- Quote End ---  

 

 

No, I can't do next step, don't know what to do for working this program  

 

Is the code correct?
0 Kudos
Altera_Forum
Honored Contributor II
677 Views

I have no idea if the code is correct. You need to write a testbench to test the code, and see if it works how you expect. 

There are many tutorials out there on how to write a testbench.
0 Kudos
Reply