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

Subversion Repositories quark

[/] [quark/] [trunk/] [01_SysRequirements/] [03_InternalRequirements/] [01_MatlabAlgorithmDesign/] [DIV_tb.m] - Blame information for rev 18

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 progman32
function DIV_tb()
2
    div_alu = 0;
3
    div_real = 0;
4
 
5
    for y = 1:65535
6
        for x = 1:65535
7
            div_alu = DIV(x,y);
8
            div_real = fix(x/y);
9
 
10
            if (div_alu ~= div_real)
11
                disp(strcat('not ok! div_alu = ',num2str(div_alu),'; div_real = ',num2str(div_real)));
12
                return;
13
            else
14
                disp(strcat('opcode ok! div_alu = ',num2str(div_alu),'; div_real = ',num2str(div_real)));
15
            end
16
        end
17
    end
18
end

powered by: WebSVN 2.1.0

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