URL
https://opencores.org/ocsvn/quark/quark/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 5 |
Rev 7 |
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
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.