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

Subversion Repositories rtf8088

[/] [rtf8088/] [trunk/] [rtl/] [verilog/] [CALL_IN.v] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2
// CALL NEAR Indirect
3
//
4
// 2009-2012 Robert Finch
5
// robfinch<remove>@opencores.org
6
//
7
// This source file is free software: you can redistribute it and/or modify 
8
// it under the terms of the GNU Lesser General Public License as published 
9
// by the Free Software Foundation, either version 3 of the License, or     
10
// (at your option) any later version.                                      
11
//                                                                          
12
// This source file is distributed in the hope that it will be useful,      
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
15
// GNU General Public License for more details.                             
16
//                                                                          
17
// You should have received a copy of the GNU General Public License        
18
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
19
//
20
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21
//
22
CALL_IN:
23
        if (!cyc_o) begin
24
                cyc_type <= `CT_WRMEM;
25
                cyc_o <= 1'b1;
26
                stb_o <= 1'b1;
27
                we_o  <= 1'b1;
28
                adr_o <= sssp;
29
                dat_o <= ip[15:8];
30
        end
31
        else if (ack_i) begin
32
                cyc_type <= `CT_PASSIVE;
33
                state <= CALL_IN1;
34
                sp <= sp_dec;
35
                stb_o <= 1'b0;
36
                we_o  <= 1'b0;
37
        end
38
CALL_IN1:
39
        if (!stb_o) begin
40
                cyc_type <= `CT_WRMEM;
41
                cyc_o <= 1'b1;
42
                stb_o <= 1'b1;
43
                we_o  <= 1'b1;
44
                adr_o <= sssp;
45
                dat_o <= ip[7:0];
46
        end
47
        else if (ack_i) begin
48
                cyc_type <= `CT_PASSIVE;
49
                ea <= {cs,`SEG_SHIFT}+b;
50
                if (mod==2'b11) begin
51
                        ip <= b;
52
                        state <= IFETCH;
53
                end
54
                else
55
                        state <= CALL_IN2;
56
                cyc_o <= 1'b0;
57
                stb_o <= 1'b0;
58
                we_o  <= 1'b0;
59
        end
60
CALL_IN2:
61
        if (!cyc_o) begin
62
                cyc_type <= `CT_RDMEM;
63
                cyc_o <= 1'b1;
64
                stb_o <= 1'b1;
65
                we_o  <= 1'b0;
66
                adr_o <= ea;
67
        end
68
        else if (ack_i) begin
69
                cyc_type <= `CT_PASSIVE;
70
                stb_o <= 1'b0;
71
                state <= CALL_IN3;
72
                b[7:0] <= dat_i;
73
        end
74
CALL_IN3:
75
        if (!stb_o) begin
76
                cyc_type <= `CT_RDMEM;
77
                stb_o <= 1'b1;
78
                adr_o <= ea_inc;
79
        end
80
        else if (ack_i) begin
81
                cyc_type <= `CT_PASSIVE;
82
                state <= CALL_IN4;
83
                cyc_o <= 1'b0;
84
                stb_o <= 1'b0;
85
                b[15:8] <= dat_i;
86
        end
87
CALL_IN4:
88
        begin
89
                state <= IFETCH;
90
                ip <= b;
91
        end
92
 

powered by: WebSVN 2.1.0

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