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

Subversion Repositories rtf8088

[/] [rtf8088/] [trunk/] [rtl/] [verilog/] [EXECUTE.v] - Diff between revs 2 and 4

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

Rev 2 Rev 4
Line 255... Line 255...
                                wrregs <= 1'b1;
                                wrregs <= 1'b1;
                                if (w)
                                if (w)
                                        case(rrr)
                                        case(rrr)
                                        3'b000: // ROL
                                        3'b000: // ROL
                                                begin
                                                begin
                                                        res <= {b[14:0],b[15]};
                                                        res <= shlo[15:0]|shlo[31:16];
                                                        cf <= bmsb;
                                                        cf <= bmsb;
                                                        vf <= bmsb^b[14];
                                                        vf <= bmsb^b[14];
                                                end
                                                end
                                        3'b001: // ROR
                                        3'b001: // ROR
                                                begin
                                                begin
                                                        res <= {b[0],b[15:1]};
                                                        res <= shruo[15:0]|shruo[31:16];
                                                        cf <= b[0];
                                                        cf <= b[0];
                                                        vf <= cf^b[15];
                                                        vf <= cf^b[15];
                                                end
                                                end
                                        3'b010: // RCL
                                        3'b010: // RCL
                                                begin
                                                begin
                                                        res <= {b[14:0],cf};
                                                        res <= shlco[16:1]|shlco[32:17];
                                                        cf <= b[15];
                                                        cf <= b[15];
                                                        vf <= b[15]^b[14];
                                                        vf <= b[15]^b[14];
                                                end
                                                end
                                        3'b011: // RCR
                                        3'b011: // RCR
                                                begin
                                                begin
                                                        res <= {cf,b[15:1]};
                                                        res <= shrcuo[15:0]|shrcuo[31:16];
                                                        cf <= b[0];
                                                        cf <= b[0];
                                                        vf <= cf^b[15];
                                                        vf <= cf^b[15];
                                                end
                                                end
                                        3'b100: // SHL
                                        3'b100: // SHL
                                                begin
                                                begin
                                                        res <= {b[14:0],1'b0};
                                                        res <= shlo[15:0];
                                                        cf <= b[15];
                                                        cf <= shlo[16];
                                                        vf <= b[15]^b[14];
                                                        vf <= b[15]^b[14];
                                                end
                                                end
                                        3'b101: // SHR
                                        3'b101: // SHR
                                                begin
                                                begin
                                                        res <= {1'b0,b[15:1]};
                                                        res <= shruo[31:16];
                                                        cf <= b[0];
                                                        cf <= shruo[15];
                                                        vf <= b[15];
                                                        vf <= b[15];
                                                end
                                                end
                                        3'b111: // SAR
                                        3'b111: // SAR
                                                begin
                                                begin
                                                        res <= {b[15],b[15:1]};
                                                        res <= shro;
                                                        cf <= b[0];
                                                        cf <= b[0];
                                                        vf <= 1'b0;
                                                        vf <= 1'b0;
                                                end
                                                end
                                        endcase
                                        endcase
                                else
                                else
                                        case(rrr)
                                        case(rrr)
                                        3'b000: // ROL
                                        3'b000: // ROL
                                                begin
                                                begin
                                                        res <= {b[6:0],b[7]};
                                                        res <= shlo8[7:0]|shlo8[15:8];
                                                        cf <= b[7];
                                                        cf <= b[7];
                                                        vf <= b[7]^b[6];
                                                        vf <= b[7]^b[6];
                                                end
                                                end
                                        3'b001: // ROR
                                        3'b001: // ROR
                                                begin
                                                begin
                                                        res <= {b[0],b[7:1]};
                                                        res <= shruo8[15:8]|shruo8[7:0];
                                                        cf <= b[0];
                                                        cf <= b[0];
                                                        vf <= cf^b[7];
                                                        vf <= cf^b[7];
                                                end
                                                end
                                        3'b010: // RCL
                                        3'b010: // RCL
                                                begin
                                                begin
                                                        res <= {b[6:0],cf};
                                                        res <= shlco8[8:1]|shlco8[16:9];
                                                        cf <= b[7];
                                                        cf <= b[7];
                                                        vf <= b[7]^b[6];
                                                        vf <= b[7]^b[6];
                                                end
                                                end
                                        3'b011: // RCR
                                        3'b011: // RCR
                                                begin
                                                begin
                                                        res <= {cf,b[7:1]};
                                                        res <= shrcuo8[15:8]|shrcuo8[7:0];
                                                        cf <= b[0];
                                                        cf <= b[0];
                                                        vf <= cf^b[7];
                                                        vf <= cf^b[7];
                                                end
                                                end
                                        3'b100: // SHL
                                        3'b100: // SHL
                                                begin
                                                begin
                                                        res <= {b[6:0],1'b0};
                                                        res <= shlo8[7:0];
                                                        cf <= b[7];
                                                        cf <= shlo8[8];
                                                        vf <= b[7]^b[6];
                                                        vf <= b[7]^b[6];
                                                end
                                                end
                                        3'b101: // SHR
                                        3'b101: // SHR
                                                begin
                                                begin
                                                        res <= {1'b0,b[7:1]};
                                                        res <= shruo8[15:8];
                                                        cf <= b[0];
                                                        cf <= shruo8[7];
                                                        vf <= b[7];
                                                        vf <= b[7];
                                                end
                                                end
                                        3'b111: // SAR
                                        3'b111: // SAR
                                                begin
                                                begin
                                                        res <= {b[7],b[7:1]};
                                                        res <= shro8;
                                                        cf <= b[0];
                                                        cf <= b[0];
                                                        vf <= 1'b0;
                                                        vf <= 1'b0;
                                                end
                                                end
                                        endcase
                                        endcase
                        end
                        end

powered by: WebSVN 2.1.0

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