Thursday, 22 November 2018

architecture - Looking for a open-source ALU


I am looking for a open ALU to compute several equations like these:


y1 = e^((constant1 - x)^2/(2*x))
y2 = constant2/y1
y3 = y2*constant3 + x*constant4

Where x is the input of my system and y3 is the output.



I would prefer that the ALU supported floating-point operations. Where can I find an open or free floating-point ALU?



Answer



As a processor guy and designer of an open-source microprocessor, I can tell you that it will be difficult to find what you are looking for.


Multiplication, subtraction and addition are very doable in hardware but irrational numbers, arbitrary powers and division are difficult if not infeasible to do in digital hardware. It may be easier to do it in analogue electronics if your equations have a tolerance for errors. Otherwise, you will need to come up with some tricks to get what you need.


If performance is not critical, you would be better served by doing it in software.


From this and some of your other questions, I think that you may need to re-define your problem or come up with a better alternative that does not rely so much on complicated math.


It may not be possible to do what you need, in hardware and you may need to resort to software emulation instead.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...