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

Subversion Repositories rtf8088

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
// ============================================================================
2
//  SCASB
3
//
4
//
5
//  2009-2012  Robert Finch
6
//  robfinch[remove]@opencores.org
7
//  Stratford
8
//
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
//  Verilog 
24
//
25
// ============================================================================
26
//
27
SCASB:
28
`include "check_for_ints.v"
29
        else if ((repz|repnz) & cxz)
30
                state <= IFETCH;
31
        else begin
32
                if (!cyc_o) begin
33
                        cyc_type <= `CT_RDMEM;
34
                        lock_o <= 1'b0;
35
                        cyc_o <= 1'b1;
36
                        stb_o <= 1'b1;
37
                        we_o  <= 1'b0;
38
                        adr_o <= esdi;
39
                end
40
                else if (ack_i) begin
41
                        cyc_type <= `CT_PASSIVE;
42
                        state <= SCASB1;
43
                        lock_o <= 1'b0;
44
                        cyc_o <= 1'b0;
45
                        stb_o <= 1'b0;
46
                        we_o  <= 1'b0;
47
                        a <= al;
48
                        b <= dat_i;
49
                        if (df)
50
                                di <= di_dec;
51
                        else
52
                                di <= di_inc;
53
                end
54
        end
55
SCASB1:
56
        begin
57
                state <= IFETCH;
58
                pf <= pres;
59
                af <= carry   (1'b0,a[3],b[3],alu_o[3]);
60
                cf <= carry   (1'b0,a[7],b[7],alu_o[7]);
61
                vf <= overflow(1'b0,a[7],b[7],alu_o[7]);
62
                sf <= alu_o[7];
63
                zf <= reszb;
64
                if (repz|repnz)
65
                        cx <= cx_dec;
66
                if ((repz & reszb) | (repnz & !reszb))
67
                        state <= SCASB;
68
        end

powered by: WebSVN 2.1.0

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