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

Subversion Repositories rtf8088

[/] [rtf8088/] [trunk/] [rtl/] [verilog/] [RETPOP.v] - Blame information for rev 4

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

Line No. Rev Author Line
1 2 robfinch
// ============================================================================
2
//  2009-2012  Robert Finch
3
//  Stratford
4
//
5
//  RETPOP
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
//  Verilog 
23
//
24
//  RETPOP: near return from subroutine and pop stack items
25
//  Fetch ip from stack
26
// ============================================================================
27
//
28
RETPOP:
29
        begin
30
                state <= RETPOP_NACK;
31
                cyc_type <= `CT_RDMEM;
32
                lock_o <= 1'b1;
33
                cyc_o <= 1'b1;
34
                stb_o <= 1'b1;
35
                we_o  <= 1'b0;
36
                adr_o <= sssp;
37
        end
38
RETPOP_NACK:
39
        if (ack_i) begin
40
                state <= RETPOP1;
41
                cyc_type <= `CT_PASSIVE;
42
                sp    <= sp_inc;
43
                stb_o <= 1'b0;
44
                ip[7:0] <= dat_i;
45
        end
46
RETPOP1:
47
        begin
48
                state <= RETPOP1_NACK;
49
                cyc_type <= `CT_RDMEM;
50
                stb_o <= 1'b1;
51
                adr_o <= sssp;
52
        end
53
RETPOP1_NACK:
54
        if (ack_i) begin
55
                state <= IFETCH;
56
                cyc_type <= `CT_PASSIVE;
57
                wrregs <= 1'b1;
58
                w <= 1'b1;
59
                rrr <= 3'd4;
60
                res <= sp_inc + data16;
61
//              sp    <= sp_inc + data16;
62
                lock_o <= 1'b0;
63
                cyc_o <= 1'b0;
64
                stb_o <= 1'b0;
65
                ip[15:8] <= dat_i;
66
        end

powered by: WebSVN 2.1.0

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