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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [fv/] [alu_chk.e] - Diff between revs 153 and 155

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

Rev 153 Rev 155
Line 73... Line 73...
                        // here i have already calculated. must compare!
                        // here i have already calculated. must compare!
 
 
                        if ((reg_result != alu_result) || (reg_x != alu_x) or (reg_y != alu_y) or (reg_status != alu_status)) {
                        if ((reg_result != alu_result) || (reg_x != alu_x) or (reg_y != alu_y) or (reg_status != alu_status)) {
                                out("#########################################################");
                                out("#########################################################");
                                print me;
                                print me;
 
                                print me.inst;
                                out("#########################################################");
                                out("#########################################################");
                                print alu_result;
                                print alu_result;
                                print alu_status;
                                print alu_status;
                                print alu_x;
                                print alu_x;
                                print alu_y;
                                print alu_y;
Line 111... Line 112...
                        ASL_ZPG: { exec_asl_mem(); }; // M,Z,C,N = M*2
                        ASL_ZPG: { exec_asl_mem(); }; // M,Z,C,N = M*2
                        ASL_ZPX: { exec_asl_mem(); };
                        ASL_ZPX: { exec_asl_mem(); };
                        ASL_ABS: { exec_asl_mem(); };
                        ASL_ABS: { exec_asl_mem(); };
                        ASL_ABX: { exec_asl_mem(); };
                        ASL_ABX: { exec_asl_mem(); };
 
 
                        BCC_REL: {};
                        BCC_REL: {}; // nothing is done. these are all branches.
                        BCS_REL: {};
                        BCS_REL: {};
                        BEQ_REL: {};
                        BEQ_REL: {};
 
                        BMI_REL: {};
 
                        BNE_REL: {};
 
                        BPL_REL: {};
 
                        BVC_REL: {};
 
                        BVS_REL: {};
 
 
 
                        BIT_ZPG: { exec_bit(); }; // Z = A & M, N = M7, V = M6
 
                        BIT_ABS: { exec_bit(); };
 
 
 
                        BRK_IMP: { reg_status[4:4] = 1; };
 
 
 
                        CLC_IMP: { reg_status[0:0] = 0; };
 
                        CLD_IMP: { reg_status[3:3] = 0; };
 
                        CLI_IMP: { reg_status[2:2] = 0; };
 
                        CLV_IMP: { reg_status[6:6] = 0; };
 
 
                        default: {
                        default: {
                                //dut_error("unknown opcode");
                                out(inst.alu_opcode);
 
                                dut_error("unknown opcode");
                        }
                        }
                };
                };
        };
        };
 
 
 
        exec_bit() is {
 
                update_z(reg_a & inst.alu_a);
 
                reg_status[7:7] = inst.alu_a[7:7];
 
                reg_status[6:6] = inst.alu_a[6:6];
 
        };
 
 
        exec_asl_acc() is {
        exec_asl_acc() is {
                reg_status[0:0] = reg_a[7:7];
                reg_status[0:0] = reg_a[7:7];
                reg_a = reg_a * 2;
                reg_a = reg_a * 2;
                update_z(reg_a);
                update_z(reg_a);
                update_n(reg_a);
                update_n(reg_a);

powered by: WebSVN 2.1.0

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