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

Subversion Repositories fpu

[/] [fpu/] [trunk/] [test_bench/] [sel_test.vh] - Diff between revs 2 and 5

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

Rev 2 Rev 5
Line 37... Line 37...
 
 
                        $display("\nRunning Combo Test 2 ...\n");
                        $display("\nRunning Combo Test 2 ...\n");
                        $readmemh ("test_vectors/combo/fpu_combo2.hex", tmem);
                        $readmemh ("test_vectors/combo/fpu_combo2.hex", tmem);
                        run_test;
                        run_test;
 
 
 
                        $display("\nRunning Combo Test 3 ...\n");
 
                        $readmemh ("test_vectors/combo/fpu_combo3.hex", tmem);
 
                        run_test;
 
 
 
                        $display("\nRunning Combo Test 4 ...\n");
 
                        $readmemh ("test_vectors/combo/fpu_combo4.hex", tmem);
 
                        run_test;
 
 
           end
           end
 
 
        if(fp_fasu)
        if(fp_fasu)
        begin
        begin
        $display("\n\nTesting FP Add/Sub Unit\n");
        $display("\n\nTesting FP Add/Sub Unit\n");
Line 678... Line 686...
                        run_test;
                        run_test;
                   end
                   end
           end
           end
        end
        end
 
 
 No newline at end of file
 No newline at end of file
 
 
 
 
 
        if(fp_i2f)
 
        begin
 
 
 
        $display("\n\nTesting FP I2F Unit\n");
 
 
 
        if(test_rmode[0])
 
           begin
 
                $display("\n+++++ ROUNDING MODE: Nearest Even\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rtne/i2f_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rtne/i2f_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rtne/i2f_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtne/i2f_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtne/i2f_sm.hex", tmem);
 
                        run_test;
 
                   end
 
           end
 
 
 
        if(test_rmode[1])
 
           begin
 
                $display("\n\n+++++ ROUNDING MODE: Towards Zero\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/i2f_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/i2f_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/i2f_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/i2f_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/i2f_sm.hex", tmem);
 
                        run_test;
 
                   end
 
           end
 
 
 
        if(test_rmode[2])
 
           begin
 
                $display("\n\n+++++ ROUNDING MODE: Towards INF+ (UP)\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rup/i2f_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rup/i2f_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rup/i2f_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rup/i2f_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rup/i2f_sm.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
           end
 
 
 
        if(test_rmode[3])
 
           begin
 
                $display("\n\n+++++ ROUNDING MODE: Towards INF- (DOWN)\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rdown/i2f_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rdown/i2f_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rdown/i2f_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rdown/i2f_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rdown/i2f_sm.hex", tmem);
 
                        run_test;
 
                   end
 
           end
 
        end
 
 
 
 
 
        if(fp_f2i)
 
        begin
 
 
 
        $display("\n\nTesting FP F2I Unit\n");
 
 
 
        if(test_rmode[0])
 
           begin
 
                $display("\n+++++ ROUNDING MODE: Nearest Even\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rtne/f2i_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rtne/f2i_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rtne/f2i_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtne/f2i_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtne/f2i_sm.hex", tmem);
 
                        run_test;
 
                   end
 
           end
 
 
 
        if(test_rmode[1])
 
           begin
 
                $display("\n\n+++++ ROUNDING MODE: Towards Zero\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/f2i_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/f2i_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/f2i_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/f2i_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rtzero/f2i_sm.hex", tmem);
 
                        run_test;
 
                   end
 
           end
 
 
 
        if(test_rmode[2])
 
           begin
 
                $display("\n\n+++++ ROUNDING MODE: Towards INF+ (UP)\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rup/f2i_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rup/f2i_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rup/f2i_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rup/f2i_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rup/f2i_sm.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
           end
 
 
 
        if(test_rmode[3])
 
           begin
 
                $display("\n\n+++++ ROUNDING MODE: Towards INF- (DOWN)\n\n");
 
 
 
                if(test_sel[0])
 
                   begin
 
                        $display("\nRunning Pat 0 Test ...\n");
 
                        $readmemh ("test_vectors/rdown/f2i_pat0.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[1])
 
                   begin
 
                        $display("\nRunning Pat 1 Test ...\n");
 
                        $readmemh ("test_vectors/rdown/f2i_pat1.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[2])
 
                   begin
 
                        $display("\nRunning Pat 2 Test ...\n");
 
                        $readmemh ("test_vectors/rdown/f2i_pat2.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[3])
 
                   begin
 
                        $display("\nRunning Random Lg. Num Test ...\n");
 
                        $readmemh ("test_vectors/rdown/f2i_lg.hex", tmem);
 
                        run_test;
 
                   end
 
 
 
                if(test_sel[4])
 
                   begin
 
                        $display("\nRunning Random Sm. Num Test ...\n");
 
                        $readmemh ("test_vectors/rdown/f2i_sm.hex", tmem);
 
                        run_test;
 
                   end
 
           end
 
        end
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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