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

Subversion Repositories quark

[/] [quark/] [trunk/] [01_SysRequirements/] [03_InternalRequirements/] [01_MatlabAlgorithmDesign/] [DIV_tb.m] - Diff between revs 3 and 5

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 3 Rev 5
function DIV_tb()
function DIV_tb()
    div_alu = 0;
    div_alu = 0;
    div_real = 0;
    div_real = 0;
 
 
    for y = 1:65535
    for y = 1:65535
        for x = 1:65535
        for x = 1:65535
            div_alu = DIV(x,y);
            div_alu = DIV(x,y);
            div_real = fix(x/y);
            div_real = fix(x/y);
 
 
            if (div_alu ~= div_real)
            if (div_alu ~= div_real)
                disp(strcat('not ok! div_alu = ',num2str(div_alu),'; div_real = ',num2str(div_real)));
                disp(strcat('not ok! div_alu = ',num2str(div_alu),'; div_real = ',num2str(div_real)));
                return;
                return;
            else
            else
                disp(strcat('opcode ok! div_alu = ',num2str(div_alu),'; div_real = ',num2str(div_real)));
                disp(strcat('opcode ok! div_alu = ',num2str(div_alu),'; div_real = ',num2str(div_real)));
            end
            end
        end
        end
    end
    end
 
 

powered by: WebSVN 2.1.0

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