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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [fv/] [alu_chk.e] - Diff between revs 133 and 134

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

Rev 133 Rev 134
Line 16... Line 16...
 
 
        keep first_cycle == TRUE;
        keep first_cycle == TRUE;
        keep count_cycles == 0;
        keep count_cycles == 0;
 
 
        store(input : alu_input_s) is {
        store(input : alu_input_s) is {
                out ("cycle ", count_cycles, ": input stored: ");
                count_cycles = count_cycles + 1;
 
 
 
                out ("CYCLE ", count_cycles, " STORE:");
                print input;
                print input;
 
 
                if (first_cycle) {
                if (first_cycle) {
                        inst = input;
                        inst = input;
                        next_inst = input;
                        next_inst = input;
Line 28... Line 30...
                else {
                else {
                        inst = next_inst;
                        inst = next_inst;
                        next_inst = input;
                        next_inst = input;
                };
                };
 
 
                count_cycles = count_cycles + 1;
 
 
 
                if (count_cycles == 10000) {
                if (count_cycles == 10000) {
                        dut_error();
                        dut_error();
                }
                }
        };
        };
Line 44... Line 45...
                        reg_y = alu_y;
                        reg_y = alu_y;
                        reg_status = alu_status;
                        reg_status = alu_status;
                        reg_a = 0; // TODO: check this
                        reg_a = 0; // TODO: check this
                }
                }
                else {
                else {
 
 
 
                        out ("CYCLE ", count_cycles, " COMPARE:");
 
                        print inst;
 
 
                        case inst.input_kind {
                        case inst.input_kind {
                                ENABLED_VALID: {
                                ENABLED_VALID: {
                                        out("cycle ", count_cycles, ": executing and comparing");
                                        out("CYCLE ", count_cycles, ": executing and comparing");
                                        execute();
                                        execute();
                                };
                                };
                                DISABLED_VALID: {
                                DISABLED_VALID: {
                                        out("cycle ", count_cycles, ": just comparing");
                                        out("CYCLE ", count_cycles, ": just comparing");
                                };
                                };
                                default: {
                                default: {
                                        dut_error("error at e code");
                                        dut_error("error at e code");
                                };
                                };
                        };
                        };
 
 
                        // here i have already calculated. must compare!
                        // here i have already calculated. must compare!
                        if (reg_a != alu_result) {
                        if (reg_a != alu_result) {
 
                                print reg_a;
 
                                print alu_result;
                                dut_error("WRONG!");
                                dut_error("WRONG!");
                        };
                        };
 
 
                        if (reg_x != alu_x) {
                        if (reg_x != alu_x) {
                                dut_error("WRONG!");
                                dut_error("WRONG!");
Line 117... Line 124...
                update_z(reg_a);
                update_z(reg_a);
                update_n(reg_a);
                update_n(reg_a);
 
 
                print me;
                print me;
 
 
                dut_error();
                //dut_error();
        };
        };
 
 
        update_z(arg : byte) is {
        update_z(arg : byte) is {
                if (arg == 0) {
                if (arg == 0) {
                        reg_status[1:1] = 1;
                        reg_status[1:1] = 1;

powered by: WebSVN 2.1.0

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