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

Subversion Repositories rtf8088

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
//=============================================================================
2
//  CALL FAR and CALL FAR indirect
3
//
4
//
5 7 robfinch
//  2009-2013 Robert Finch
6 2 robfinch
//  Stratford
7 7 robfinch
//  robfinch<remove>@finitron.ca
8 2 robfinch
//
9
//
10
// This source file is free software: you can redistribute it and/or modify 
11
// it under the terms of the GNU Lesser General Public License as published 
12
// by the Free Software Foundation, either version 3 of the License, or     
13
// (at your option) any later version.                                      
14
//                                                                          
15
// This source file is distributed in the hope that it will be useful,      
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
18
// GNU General Public License for more details.                             
19
//                                                                          
20
// You should have received a copy of the GNU General Public License        
21
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
22
//
23
//
24
//=============================================================================
25
//
26
CALLF:
27
        begin
28 7 robfinch
                write(`CT_WRMEM,sssp,cs[15:8]);
29 2 robfinch
                lock_o <= 1'b1;
30
                state <= CALLF1;
31
        end
32
CALLF1:
33
        if (ack_i) begin
34 7 robfinch
                pause_stack_push();
35 2 robfinch
                state <= CALLF2;
36
        end
37
CALLF2:
38
        begin
39 7 robfinch
                write(`CT_WRMEM,sssp,cs[7:0]);
40 2 robfinch
                state <= CALLF3;
41
        end
42
CALLF3:
43
        if (ack_i) begin
44 7 robfinch
                pause_stack_push();
45 2 robfinch
                state <= CALLF4;
46
        end
47
CALLF4:
48
        begin
49 7 robfinch
                write(`CT_WRMEM,sssp,ip[15:8]);
50 2 robfinch
                state <= CALLF5;
51
        end
52
CALLF5:
53
        if (ack_i) begin
54 7 robfinch
                pause_stack_push();
55 2 robfinch
                state <= CALLF6;
56
        end
57
CALLF6:
58
        begin
59 7 robfinch
                write(`CT_WRMEM,sssp,ip[7:0]);
60 2 robfinch
                state <= CALLF7;
61
        end
62
CALLF7:
63
        if (ack_i) begin
64 7 robfinch
                nack();
65 2 robfinch
                if (ir==8'hFF && rrr==3'b011)   // CALL FAR indirect
66
                        state <= JUMP_VECTOR1;
67
                else begin
68
                        cs <= selector;
69
                        ip <= offset;
70
                        state <= IFETCH;
71
                end
72
        end

powered by: WebSVN 2.1.0

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