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

Subversion Repositories rf6809

[/] [rf6809/] [trunk/] [rtl/] [cpu/] [rf6809.sv] - Diff between revs 2 and 11

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

Rev 2 Rev 11
Line 206... Line 206...
                        (ir[bitsPerByte+2] ? 5'd1 : 5'd0) +
                        (ir[bitsPerByte+2] ? 5'd1 : 5'd0) +
                        (ir[bitsPerByte+3] ? 5'd1 : 5'd0) +
                        (ir[bitsPerByte+3] ? 5'd1 : 5'd0) +
                        (ir[bitsPerByte+4] ? 5'd2 : 5'd0) +
                        (ir[bitsPerByte+4] ? 5'd2 : 5'd0) +
                        (ir[bitsPerByte+5] ? 5'd2 : 5'd0) +
                        (ir[bitsPerByte+5] ? 5'd2 : 5'd0) +
                        (ir[bitsPerByte+6] ? 5'd2 : 5'd0) +
                        (ir[bitsPerByte+6] ? 5'd2 : 5'd0) +
                        (ir[bitsPerByte+7] ? 5'd2 : 5'd0)
                        (ir[bitsPerByte+7] ? (isFar ? 5'd3 : 5'd2) : 5'd0)
                        ;
                        ;
//  cnt = 0;
//  cnt = 0;
//      if (ir[8]) cnt = cnt + 5'd1;    // CC
//      if (ir[8]) cnt = cnt + 5'd1;    // CC
//      if (ir[9]) cnt = cnt + md32 ? 5'd4 : 5'd1;      // A
//      if (ir[9]) cnt = cnt + md32 ? 5'd4 : 5'd1;      // A
//      if (ir[10]) cnt = cnt + md32 ? 5'd4 : 5'd1;     // B
//      if (ir[10]) cnt = cnt + md32 ? 5'd4 : 5'd1;     // B
Line 1046... Line 1046...
                waitcnt <= 6'd20;
                waitcnt <= 6'd20;
                next_state(ICACHE7);
                next_state(ICACHE7);
        end
        end
ICACHE7:
ICACHE7:
        if (waitcnt==6'd0) begin
        if (waitcnt==6'd0) begin
                next_state(ICACHE6);
                next_state(ICACHE5);
                adr_o <= icwa;
                adr_o <= icwa;
                for (n4 = 15; n4 >= 0; n4 = n4 - 1)
                for (n4 = 15; n4 >= 0; n4 = n4 - 1)
                        if (~icgot[n4] & ~outstanding[n4]) begin
                        if (~icgot[n4]) begin// & ~outstanding[n4]) begin
                                cti_o <= 3'b001;
                                cti_o <= 3'b001;
                                cyc_o <= TRUE;
                                cyc_o <= `TRUE;
                                stb_o <= TRUE;
                                stb_o <= `TRUE;
                                adr_o[3:0] <= n4[3:0];
                                adr_o[3:0] <= n4[3:0];
                                outstanding[n4[3:0]] <= 1'b1;
                                outstanding[n4[3:0]] <= 1'b1;
                                next_state(ICACHE9);
                                next_state(ICACHE9);
                        end
                        end
        end
        end
Line 1065... Line 1065...
ICACHE9:
ICACHE9:
        begin
        begin
                if (bto)
                if (bto)
                        outstanding <= 16'h0;
                        outstanding <= 16'h0;
                if (aack_i)
                if (aack_i)
                        outstanding[adr_o[3:0]] <= 1'b0;
                        outstanding[atag_i] <= 1'b0;
                if (ack_i|rty_i|bto) begin
                if (ack_i|rty_i|bto) begin
                        wb_nack();
                        wb_nack();
                        waitcnt <= 6'd20;
                        waitcnt <= 6'd20;
                        next_state(ICACHE7);
                        next_state(ICACHE7);
                end
                end
Line 2933... Line 2933...
                        end
                        end
        `LW_ACCB:       begin
        `LW_ACCB:       begin
                                accb <= dat;
                                accb <= dat;
                                radr <= radr + 2'd1;
                                radr <= radr + 2'd1;
                                if (isRTI) begin
                                if (isRTI) begin
                                        $display("loaded accb=%h from ", dat, radr);
                                        $display("loaded accb=%h from %h", dat, radr);
                                        ssp <= ssp + 2'd1;
                                        ssp <= ssp + 2'd1;
                                        next_state(PULL1);
                                        next_state(PULL1);
                                end
                                end
                                else if (isPULU) begin
                                else if (isPULU) begin
                                        usp <= usp + 2'd1;
                                        usp <= usp + 2'd1;
Line 3095... Line 3095...
                                        next_state(IFETCH);
                                        next_state(IFETCH);
                        end
                        end
        `LW_PCL:        begin
        `LW_PCL:        begin
                                pc[`LOBYTE] <= dat;
                                pc[`LOBYTE] <= dat;
                                radr <= radr + 2'd1;
                                radr <= radr + 2'd1;
 
                                // If loading from the vector table in bank zero, force pc[23:16]=0
 
                                if (radr[`BYTE3]=={BPB{1'b0}} && radr[`BYTE2]=={BPB{1'b1}} && radr[7:4]==4'hF)
 
                                        pc[`BYTE3] <= {BPB{1'b0}};
                                if (isRTI|isRTS|isPULS) begin
                                if (isRTI|isRTS|isPULS) begin
                                        $display("loadded PCL=%h", dat);
                                        $display("loadded PCL=%h", dat);
                                        ssp <= ssp + 2'd1;
                                        ssp <= ssp + 2'd1;
                                end
                                end
                                else if (isPULU)
                                else if (isPULU)

powered by: WebSVN 2.1.0

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