Skip to content

Commit

Permalink
ice-v fix for current limitations on signed defines
Browse files Browse the repository at this point in the history
  • Loading branch information
sylefeb committed Jul 13, 2024
1 parent 7c60c9c commit f0a6e6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/ice-v/CPUs/ice-v-swirl.si
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,8 @@ $$if ICEV_MULDIV then
uint1 signb = xb[31,1]; // vvvvvvvvvv keep the sign?
int33 ma = {signa & (mulh | mulhsu), xa};
int33 mb = {signb & mulh, xb};
int64 mul = ma * mb; // multiply
int64 mul = __signed(ma) * __signed(mb); // multiply
// ^^^^^^^^ ^^^^^^^^ due to a yosys/Silice issue, see Algorithm.cpp L1523
uint1 signdiv = ~ op[0,1];
uint1 divdone = isdone(div) & ~prev_divdone; // pulses on div done
uint1 prev_divdone = isdone(div);
Expand Down

0 comments on commit f0a6e6b

Please sign in to comment.