mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-02 23:28:00 +00:00
symfpu: Add altsqrt
No denormalization here. That can be a problem for later (or not at all).
This commit is contained in:
parent
48cb1d10b1
commit
c2731b43a4
2 changed files with 5 additions and 2 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 95b27d8f2f7cd965e13ca5ff33fd7b47c410b561
|
Subproject commit 50cca80758d16bf72161d4d2eafb7b7c18ab44ba
|
||||||
|
|
@ -447,7 +447,8 @@ struct SymFpuPass : public Pass {
|
||||||
}
|
}
|
||||||
if (args[argidx] == "-op" && argidx+1 < args.size()) {
|
if (args[argidx] == "-op" && argidx+1 < args.size()) {
|
||||||
op = args[++argidx];
|
op = args[++argidx];
|
||||||
if (op.compare("sqrt") == 0)
|
if (op.compare("sqrt") == 0
|
||||||
|
|| op.compare("altsqrt") == 0) // currently undocumented
|
||||||
inputs = 1;
|
inputs = 1;
|
||||||
else if (op.compare("add") == 0
|
else if (op.compare("add") == 0
|
||||||
|| op.compare("sub") == 0
|
|| op.compare("sub") == 0
|
||||||
|
|
@ -534,6 +535,8 @@ struct SymFpuPass : public Pass {
|
||||||
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(true));
|
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(true));
|
||||||
else if (op.compare("alt2div") == 0)
|
else if (op.compare("alt2div") == 0)
|
||||||
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(false));
|
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(false));
|
||||||
|
else if (op.compare("altsqrt") == 0)
|
||||||
|
return symfpu::falseSqrt_flagged(format, rounding_mode, a);
|
||||||
else
|
else
|
||||||
log_abort();
|
log_abort();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue