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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [rtl/] [core/] [cpuops.v] - Diff between revs 3 and 12

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

Rev 3 Rev 12
Line 65... Line 65...
                        4'h6:      o_c   <= { i_a[31:16], i_b[15:0] }; // LODILO
                        4'h6:      o_c   <= { i_a[31:16], i_b[15:0] }; // LODILO
                        4'h7:      o_c   <= { i_b[15:0], i_a[15:0] }; // LODIHI
                        4'h7:      o_c   <= { i_b[15:0], i_a[15:0] }; // LODIHI
                        4'ha: { c, o_c } <= i_a + i_b;          // Add
                        4'ha: { c, o_c } <= i_a + i_b;          // Add
                        4'hb:      o_c   <= i_a | i_b;          // Or
                        4'hb:      o_c   <= i_a | i_b;          // Or
                        4'hc:      o_c   <= i_a ^ i_b;          // Xor
                        4'hc:      o_c   <= i_a ^ i_b;          // Xor
                        4'hd: { c, o_c } <= {1'b0, i_a } << i_b[4:0];    // LSL
                        4'hd: { c, o_c } <= (|i_b[31:5])? 33'h00 : {1'b0, i_a } << i_b[4:0];     // LSL
                        4'he: { c, o_c } <= { i_a[31],i_a}>> (i_b[4:0]);// ASR
                        4'he: { c, o_c } <= (|i_b[31:5])? {(33){i_a[31]}}:{ i_a[31],i_a}>> (i_b[4:0]);// ASR
                        4'hf: { c, o_c } <= { 1'b0, i_a } >> (i_b[4:0]);// LSR
                        4'hf: { c, o_c } <= (|i_b[31:5])? 33'h00 : { 1'b0, i_a } >> (i_b[4:0]);// LSR
                        default:   o_c   <=       i_b;          // MOV, LDI
                        default:   o_c   <=       i_b;          // MOV, LDI
                        endcase
                        endcase
                end
                end
 
 
        assign  z = (o_c == 32'h0000);
        assign  z = (o_c == 32'h0000);

powered by: WebSVN 2.1.0

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