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

Subversion Repositories rtf65002

[/] [rtf65002/] [trunk/] [rtl/] [verilog/] [load.v] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 20 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2013  Robert Finch, Stratford
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch<remove>@opencores.org
6
//       ||
7
//
8
// This source file is free software: you can redistribute it and/or modify 
9
// it under the terms of the GNU Lesser General Public License as published 
10
// by the Free Software Foundation, either version 3 of the License, or     
11
// (at your option) any later version.                                      
12
//                                                                          
13
// This source file is distributed in the hope that it will be useful,      
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
16
// GNU General Public License for more details.                             
17
//                                                                          
18
// You should have received a copy of the GNU General Public License        
19
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
20
//                                                   
21
// ============================================================================
22
//
23
// Performs the data fetch for both eight bit and 32 bit modes
24
// Handle the following address modes: zp : zp,Rn : abs : abs,Rn
25
LOAD1:
26
        if (unCachedData) begin
27
                if (isRMW)
28
                        lock_o <= 1'b1;
29
                cyc_o <= 1'b1;
30
                stb_o <= 1'b1;
31
                sel_o <= 4'hf;
32
                adr_o <= {radr,2'b00};
33
                state <= LOAD2;
34
        end
35
        else if (dhit) begin
36
                b8 <= rdat8;
37
                b <= rdat;
38
                state <= em ? BYTE_CALC : CALC;
39
        end
40
        else
41
                dmiss <= `TRUE;
42
LOAD2:
43
        if (ack_i) begin
44
                cyc_o <= 1'b0;
45
                stb_o <= 1'b0;
46
                sel_o <= 4'h0;
47
                adr_o <= 34'd0;
48
                b8 <= dati;
49
                b <= dat_i;
50
                state <= em ? BYTE_CALC : CALC;
51
        end
52 21 robfinch
        else if (err_i) begin
53
                cyc_o <= 1'b0;
54
                stb_o <= 1'b0;
55
                sel_o <= 4'h0;
56
                adr_o <= 34'd0;
57
                state <= BUS_ERROR;
58
        end

powered by: WebSVN 2.1.0

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