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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [rtl/] [core/] [cpuops.v] - Diff between revs 71 and 80

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

Rev 71 Rev 80
Line 61... Line 61...
        // Bit reversal pre-logic
        // Bit reversal pre-logic
        wire    [31:0]   w_brev_result;
        wire    [31:0]   w_brev_result;
        genvar  k;
        genvar  k;
        generate
        generate
        for(k=0; k<32; k=k+1)
        for(k=0; k<32; k=k+1)
 
        begin : bit_reversal_cpuop
                assign w_brev_result[k] = i_b[31-k];
                assign w_brev_result[k] = i_b[31-k];
        endgenerate
        end endgenerate
 
 
        // Popcount pre-logic
        // Popcount pre-logic
        wire    [31:0]   w_popc_result;
        wire    [31:0]   w_popc_result;
        assign  w_popc_result[5:0]=
        assign  w_popc_result[5:0]=
                 ({5'h0,i_b[ 0]}+{5'h0,i_b[ 1]}+{5'h0,i_b[ 2]}+{5'h0,i_b[ 3]})
                 ({5'h0,i_b[ 0]}+{5'h0,i_b[ 1]}+{5'h0,i_b[ 2]}+{5'h0,i_b[ 3]})
Line 131... Line 132...
                assign o_illegal = r_illegal;
                assign o_illegal = r_illegal;
        end else begin
        end else begin
                //
                //
                // Multiply pre-logic
                // Multiply pre-logic
                //
                //
                wire            [16:0]   w_mpy_a_input, w_mpy_b_input;
                wire    signed  [16:0]   w_mpy_a_input, w_mpy_b_input;
                wire            [33:0]   w_mpy_result;
                wire            [33:0]   w_mpy_result;
                reg             [31:0]   r_mpy_result;
                reg             [31:0]   r_mpy_result;
                assign  w_mpy_a_input ={ ((i_a[15])&(i_op[0])), i_a[15:0] };
                assign  w_mpy_a_input ={ ((i_a[15])&(i_op[0])), i_a[15:0] };
                assign  w_mpy_b_input ={ ((i_b[15])&(i_op[0])), i_b[15:0] };
                assign  w_mpy_b_input ={ ((i_b[15])&(i_op[0])), i_b[15:0] };
                assign  w_mpy_result   = w_mpy_a_input * w_mpy_b_input;
                assign  w_mpy_result   = w_mpy_a_input * w_mpy_b_input;

powered by: WebSVN 2.1.0

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