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

Subversion Repositories rtf8088

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

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 7 robfinch
// robfinch<remove>@finitron.ca
6 2 robfinch
//
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 7 robfinch
        if (!cyc_o)
24
                write(`CT_WRMEM,sssp,ip[15:8]);
25 2 robfinch
        else if (ack_i) begin
26 7 robfinch
                pause_stack_push();
27 2 robfinch
                state <= CALL_IN1;
28
        end
29
CALL_IN1:
30 7 robfinch
        if (!stb_o)
31
                write(`CT_WRMEM,sssp,ip[7:0]);
32 2 robfinch
        else if (ack_i) begin
33 7 robfinch
                nack();
34 2 robfinch
                ea <= {cs,`SEG_SHIFT}+b;
35
                if (mod==2'b11) begin
36
                        ip <= b;
37
                        state <= IFETCH;
38
                end
39
                else
40
                        state <= CALL_IN2;
41
        end
42
CALL_IN2:
43 7 robfinch
        if (!cyc_o)
44
                read(`CT_RDMEM,ea);
45 2 robfinch
        else if (ack_i) begin
46 7 robfinch
                pause_read();
47 2 robfinch
                state <= CALL_IN3;
48
                b[7:0] <= dat_i;
49
        end
50
CALL_IN3:
51 7 robfinch
        if (!stb_o)
52
                read(`CT_RDMEM,ea_inc);
53 2 robfinch
        else if (ack_i) begin
54 7 robfinch
                nack();
55 2 robfinch
                state <= CALL_IN4;
56
                b[15:8] <= dat_i;
57
        end
58
CALL_IN4:
59
        begin
60
                state <= IFETCH;
61
                ip <= b;
62
        end
63
 

powered by: WebSVN 2.1.0

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