Re:Multiplying and Dividing on the 6502 (2021)
by kjs3 on Tuesday June 28, 2022 @05:24PM
(#31913209)
That's...very weird I guess? Hardware mul/div requires so little chip real-estate relative to the whole die these days, and has such obvious advantage, why did they make it optional?
[ Parent
| on HN ]
Re:Multiplying and Dividing on the 6502 (2021)
by shadowofneptune on Tuesday June 28, 2022 @08:18PM
(#31914865)
The point of the baseline spec, as far as I know, is to make a modern chip design that even the smallest fab or ASIC can build on its own.
Re:Multiplying and Dividing on the 6502 (2021)
by spc476 on Tuesday June 28, 2022 @08:25PM
(#31914928)
I wrote almost nothing but assembly for ten years (mid 80s to mid 90s) and I think I can count on one hand the number of times I actually needed a generalized multiplication/division instruction. Heck, even square root could be done with repeated subtraction which could be Good Enough(TM), or maybe a lookup table.
Re:Multiplying and Dividing on the 6502 (2021)
by kragen on Tuesday June 28, 2022 @08:32PM
(#31914993)
The SeRV implementation of RISC-V fits into 200 4-LUTs on an ICE40 FPGA. If your FPGA doesn't have a multiplier, how many 4-LUTs do you need to build a 32x32 multiplier? I'm guessing the answer is comparable to 200.
Re:Multiplying and Dividing on the 6502 (2021)
by kjs3 on Tuesday June 28, 2022 @11:35PM
(#31916180)
Ah, you're right. I'm thinking in terms of transistors, not LUTs.
Re:Multiplying and Dividing on the 6502 (2021)
by kragen on Wednesday June 29, 2022 @12:33AM
(#31916540)
I think the case is even stronger if you're counting in transistors, because FPGAs usually come with multipliers built in, but bare silicon wafers don't. A CPU such as a 6502 or an Intersil 6100 (a PDP-8 on a chip) costs on the order of 4000 transistors. I suspect SeRV would be about the same size, maybe a bit smaller. How many transistors do you need for a 32-bit multiplier?