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

Subversion Repositories rtf8088

[/] [rtf8088/] [trunk/] [rtl/] [verilog/] [inb.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
// ============================================================================
2
//  INB.v
3
//  - Fetch data from IO.
4
//
5
//
6
//  2009,2010,2012  Robert Finch
7
//  robfinch<remove>@opencores.org
8
//  Stratford
9
//
10
//  
11
// This source file is free software: you can redistribute it and/or modify 
12
// it under the terms of the GNU Lesser General Public License as published 
13
// by the Free Software Foundation, either version 3 of the License, or     
14
// (at your option) any later version.                                      
15
//                                                                          
16
// This source file is distributed in the hope that it will be useful,      
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
19
// GNU General Public License for more details.                             
20
//                                                                          
21
// You should have received a copy of the GNU General Public License        
22
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
23
//
24
//  Verilog 
25
//
26
// ============================================================================
27
//
28
INB:
29
        begin
30
                `INITIATE_CODE_READ
31
                state <= INB1;
32
        end
33
INB1:
34
        if (ack_i) begin
35
                `TERMINATE_CODE_READ
36
                ea <= {12'h00,dat_i};
37
                state <= INB2;
38
        end
39
INB2:
40
        begin
41
                cyc_type <= `CT_RDIO;
42
                mio_o <= 1'b0;
43
                cyc_o <= 1'b1;
44
                stb_o <= 1'b1;
45
                we_o  <= 1'b0;
46
                adr_o <= ea;
47
                state <= INB3;
48
        end
49
INB3:
50
        if (ack_i) begin
51
                cyc_type <= `CT_PASSIVE;
52
                mio_o <= 1'b1;
53
                cyc_o <= 1'b0;
54
                stb_o <= 1'b0;
55
                res[7:0] <= dat_i;
56
                w <= 1'b0;
57
                rrr <= 3'd0;
58
                wrregs <= 1'b1;
59
                state <= IFETCH;
60
        end
61
 

powered by: WebSVN 2.1.0

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