# How to properly describe a Math Equation in Verilog to be synthesizable?

I have not been able to find a book or information in internet, about the correct way to describe a Math Equation in Verilog.

With the correct way I mean for example, how to analyze the equation and to express it, Behavioral? Sequential? How to take advantage of the Non-blocking assignments, or if to avoid the blocking assignments. Create the basics operations in a different module and instantiate, as a task? or to create everything in one module?

I have not been able even to find an example in internet, arithmetic books limit themselves to the basic operations and fixed-floating point representations.

Let's say an equation like this: A = (B + 1) / C^(B-10.05)

MOREOVER, I sense like Verilog/VHDL was not designed to do this (this would explain the lack of information?), most of the books teach how to do registers, memories, latches, flip-flop, then state machines, THEN a full Microprocessor with instruction set and ALU.

Might I be wrongly focusing my vision of Arithmetic (equation implementation) in verilog? Is designing a Microprocessor a better aproach for this kind of equations?

• vhdl/verilog can do this. Calculators can ergo logic can. How small & how fast is the real question. TIP. Don't think in algebra... in vhdl is it quicker and cheaper todo a shift and add/subtract rather than multiply.
– user16222
Commented Feb 4, 2016 at 13:24
• Could you shortly describe how to describe some simple equation like A = (B + 1) / (B * 5)? I didn't say that verilog can't BUT how, is the question, afaics the language is highly limited unless you actually design the components of a Calculator then make the calculations. Commented Feb 4, 2016 at 13:31
• The language is highly logical & that is the point of it.
– user16222
Commented Feb 4, 2016 at 13:32