mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-06 09:00:54 +00:00
symfpu: Add altdiv
This commit is contained in:
parent
d628022459
commit
67a6b10e7b
3 changed files with 5 additions and 1 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7fce38f94fa0730b3010443eb9a1390c91e5fba0
|
Subproject commit 04da5d2283989b51fe0ab44472cc598c9c50c83f
|
||||||
|
|
@ -452,6 +452,7 @@ struct SymFpuPass : public Pass {
|
||||||
else if (op.compare("add") == 0
|
else if (op.compare("add") == 0
|
||||||
|| op.compare("sub") == 0
|
|| op.compare("sub") == 0
|
||||||
|| op.compare("mul") == 0
|
|| op.compare("mul") == 0
|
||||||
|
|| op.compare("altdiv") == 0 // currently undocumented
|
||||||
|| op.compare("div") == 0)
|
|| op.compare("div") == 0)
|
||||||
inputs = 2;
|
inputs = 2;
|
||||||
else if (op.compare("muladd") == 0)
|
else if (op.compare("muladd") == 0)
|
||||||
|
|
@ -528,6 +529,8 @@ struct SymFpuPass : public Pass {
|
||||||
return symfpu::sqrt_flagged(format, rounding_mode, a);
|
return symfpu::sqrt_flagged(format, rounding_mode, a);
|
||||||
else if (op.compare("muladd") == 0)
|
else if (op.compare("muladd") == 0)
|
||||||
return symfpu::fma_flagged(format, rounding_mode, a, b, c);
|
return symfpu::fma_flagged(format, rounding_mode, a, b, c);
|
||||||
|
else if (op.compare("altdiv") == 0)
|
||||||
|
return symfpu::falseDivide_flagged(format, rounding_mode, a, b);
|
||||||
else
|
else
|
||||||
log_abort();
|
log_abort();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,6 @@ prove_op sub "-DSUB -DADDSUB -DADDS"
|
||||||
prove_op mul "-DMUL -DMULS"
|
prove_op mul "-DMUL -DMULS"
|
||||||
prove_op div "-DDIV"
|
prove_op div "-DDIV"
|
||||||
prove_op muladd "-DMULADD -DMULS -DADDS"
|
prove_op muladd "-DMULADD -DMULS -DADDS"
|
||||||
|
prove_op altdiv "-DDIV -DALTDIV"
|
||||||
|
|
||||||
generate_mk --yosys-scripts
|
generate_mk --yosys-scripts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue