Site Search

There are two methods of computational processing:"software processing" using a processor (CPU) or microcontroller, and "hardware processing" using a dedicated LSI or FPGA.

Each has its own advantages and disadvantages, so by combining the two you can create the ideal equipment at a low cost.

We will explain the differences between each processing method.

Software processing

Calculations using software are similar to the way a person calculates using a regular calculator and a notepad.

Software processing is "sequential processing," meaning that the next process is performed after the previous process is completed, so it is difficult to speed up, but the required calculation circuits can be smaller because they can be reused.

 

For example, if you solve the problem "What is the value of y when A=3, B=5, C=9, and x=4 in the formula "y = Ax 2 +Bx+C"" using a single "normal calculator,"

Step 1 (Multiplication): x2= 4 x 4 = 16, so note down  "16"

Step 2 (Multiplication): Ax 2 =  3x2 = 3 x 16 (Step1) = 48, so note down "48"

Step 3 (Multiplication): Bx = 5x = 5 x 4 = 20, so note down "20"

Step 4 (Addition): Ax 2 +Bx  = 48 (Step2) + 20 (Step3) = 68, so note down "68"

Step 5 (Addition): Ax 2 +Bx+C = 68 (Step 4) + 9 = 77, so the value of y is "77" 

Processors also have an ALU (Arithmetic and Logic Unit) that performs arithmetic operations (arithmetic operations) like a regular calculator, and registers that temporarily store "values" like a memo pad.

When the calculation y= Ax2+Bx+C is performed using software processing, the formula is broken down and calculated as shown in steps 1 to 5.

One multiplier can calculate Step 1, Step 2, and Step 3, and one adder can calculate Step 4 and Step 5, which has the advantage of allowing for efficient use of limited hardware resources, but the overall processing speed is slower because the calculations are not performed in parallel.

 

Also, in the above calculation, three multiplications and two additions are performed, but if we improve the software and factorize it, we get y= 3x2+ 5x + 9 = x(3x  +5)+9, reducing it to two multiplications and two additions.

In this way, even if the same processor is used, the calculation speed and power consumption can be improved depending on how the software is written.

◆ Benefits

- A single ALU can be reused to handle a variety of calculations (low hardware cost).

◆ Disadvantages

- Slow processing speed

· real time *  Difficult to process

・High power consumption

・ Requires a lot of registers and memory

* Real-time: Even if multiple tasks are processed simultaneously, they are always completed within the specified time.

Hardware Processing

Hardware-based calculations are similar to how a person performs calculations using a programmable scientific calculator.

Wherever possible, simultaneous calculations are performed simultaneously (parallel processing), and intermediate values are passed immediately to the next calculation without being read or written to a register each time, making it fast and low power consumption.

 

If you use hardware to process the same calculation as above,"y = Ax 2 +Bx+C," you can get the result just by entering the input values.

Step1:  Substituting A=3, B=5, C=9, x=4 into the circuit y = Ax 2 +Bx+C,

y  The value of  "77" 

 

The reasons why hardware processing has faster calculation speeds, lower power consumption, and higher throughput even at lower operating frequencies than software processing are as follows.

・ Calculate "x 2"and"Bx", and"Ax 2"and"Bx+C" simultaneously (parallel processing)

・No need to input/output data to/from registers for each step

This calculation can run independently, even while other tasks are being processed, allowing for real-time processing.

(The software reuses the same arithmetic circuit, so it must wait while other processing is in progress.)

However, since it can only process tasks created by hardware, it is necessary to prepare a circuit for each task.

 

◆ Advantages:

- Fast processing speed (high throughput)

- This task can be processed independently of other task processing (real-time)  Processing is good)

-Low power consumption (low power consumption)

◆ Disadvantages

・It cannot process tasks other than the circuit it created.

・The more types of tasks there are, the larger the circuit scale becomes (increasing costs)

Coexistence of software and hardware processing

The advantages and disadvantages of software processing (sequential processing) and hardware processing (parallel processing) are contradictory.

Therefore, by combining the two, you can create the ideal system at a low cost.

 

For example, by using hardware for frequently used, heavy processing and software for less frequently used, light processing, a system can be realized that is "high speed," "low power consumption," and "multi-functional."

 

Specifically, it is possible to miniaturize the system by installing a small-scale FPGA next to an inexpensive general-purpose microcontroller, or by using an SoC FPGA with a built-in hardware processor (such as ARM) instead of a general-purpose microcontroller.
If you have a PC, you can also use an FPGA accelerator card like the one shown on the right by inserting it into the PCI Express slot.

 

◆ Tasks best suited for software processing
・Tasks that do not require high speed processing
(General applications, business processes, etc.)
- Tasks that are used infrequently

・ Tasks with many revisions

◆ Tasks best suited for hardware processing
- Tasks that require high-speed processing
(High-speed image processing, signal processing, encryption/decryption, digital signal processing, etc.)
- Tasks that require real-time processing (when you don't want to be affected by processor congestion)
・Tasks where you want to reduce power consumption

Frequently used tasks

Related Information