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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [rtl/] [verilog/] [t6507lp_fsm.v] - Diff between revs 194 and 195

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 194 Rev 195
Line 239... Line 239...
                                /*
                                /*
                                in this state the opcode is already known so truly execution begins.
                                in this state the opcode is already known so truly execution begins.
                                all instructions execute this cycle.
                                all instructions execute this cycle.
                                */
                                */
                                FETCH_LOW: begin
                                FETCH_LOW: begin
                                        if (accumulator || implied) begin
                                        if (accumulator || implied || txs || tsx) begin
                                                pc <= pc; // is this better?
                                                pc <= pc; // is this better?
                                                address <= pc;
                                                address <= pc;
                                                mem_rw <= MEM_READ;
                                                mem_rw <= MEM_READ;
 
 
                                                if (txs) begin
                                                if (txs) begin
Line 603... Line 603...
                                alu_opcode = ir;
                                alu_opcode = ir;
                                alu_enable = 1'b1;
                                alu_enable = 1'b1;
                                alu_a = temp_data;
                                alu_a = temp_data;
                        end
                        end
                        FETCH_LOW: begin
                        FETCH_LOW: begin
                                if (accumulator  || implied) begin
                                if (accumulator  || implied || txs) begin
                                        alu_opcode = ir;
                                        alu_opcode = ir;
                                        alu_enable = 1'b1;
                                        alu_enable = 1'b1;
                                        next_state = FETCH_OP;
                                        next_state = FETCH_OP;
 
 
                                        if (tsx) begin
 
                                                alu_a = sp[7:0];
 
                                        end
                                        end
 
                                else if (tsx) begin
 
                                        alu_opcode = ir;
 
                                        alu_enable = 1'b1;
 
                                        next_state = FETCH_OP;
 
                                        alu_a = sp[7:0];
                                end
                                end
                                else if (immediate) begin
                                else if (immediate) begin
                                        next_state = FETCH_OP_CALC_PARAM;
                                        next_state = FETCH_OP_CALC_PARAM;
                                end
                                end
                                else if (zero_page) begin
                                else if (zero_page) begin

powered by: WebSVN 2.1.0

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