OpenCores
URL https://opencores.org/ocsvn/opencpu32/opencpu32/trunk

Subversion Repositories opencpu32

[/] [opencpu32/] [trunk/] [hdl/] [opencpu32/] [Alu.vhd] - Diff between revs 16 and 17

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 16 Rev 17
Line 27... Line 27...
architecture Behavioral of Alu is
architecture Behavioral of Alu is
 
 
begin
begin
        --! Behavior description of combinational circuit (Can not infer any FF(Flip flop)) of the Alu
        --! Behavior description of combinational circuit (Can not infer any FF(Flip flop)) of the Alu
        process (A,B,sel) is
        process (A,B,sel) is
 
        variable mulResult : std_logic_vector(((nBits*2) - 1)downto 0);
        begin
        begin
                case sel is
                case sel is
                        when alu_pass =>
                        when alu_pass =>
                                --Pass operation
                                --Pass operation
                                S <= A;
                                S <= A;
Line 51... Line 52...
                                --Decrement operation
                                --Decrement operation
                                S <= A - conv_std_logic_vector(1, n+1);
                                S <= A - conv_std_logic_vector(1, n+1);
 
 
                        when alu_mul =>
                        when alu_mul =>
                                --Multiplication operation
                                --Multiplication operation
                                S <= A * B;
                                mulResult := A * B;
 
                                S <= mulResult((nBits - 1) downto 0);
 
 
                        when alu_and =>
                        when alu_and =>
                                --And operation
                                --And operation
                                S <= A and B;
                                S <= A and B;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.