Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what is the difference between hardware and software implementation?

Status
Not open for further replies.

mahaju

Full Member level 2
Joined
Mar 17, 2007
Messages
125
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,298
Activity points
2,252
What is the difference between hardware and software implementation of some logic concept?
Let me elaborate my question.

Suppose we have a hypothetical microprocessor with lots of internal registers but just 3 instructions: add, subtract and shift.
So if we need to add two numbers we can just use the add instruction to do it directly.
The logic circuits built into the microprocessor for doing the adding, subtracting and shifting would be an example of hardware implementation (isn't it?)
Now if I need to multiply two numbers, I cannot do it directly since there is no multiply instruction.
So I make an elaborate sequence of add and shift instructions on the basis of schoolbook method of multiplication
Now this multiplication operation is an example of software implementation

This is the concept I have of the difference between hardware and software implementation
Please let me know if I have any problems with it

Also, let us say the microprocessor designers come up with an upgrade and now it has a mul a,b instruction, which I use to find the product
This this multiplication operation now a hardware implementation or software implementation?
 

mmmm i think your talk is about micro-instructions and instructions in a microprocessor, the instructions are general commands which we feed to the microprocessor. Like ADD, SUB or SHIFT (in your example)

the micro-instructions make the instructions possible, as a simple ADD A,B instructions will have at least 6 microinstructions (some in parallel) will be

_load_instruction [and analyse/decode!]
_load_A_in_ALU_R1
_load_B_in_ALU_R2
_perform_add_with_alu
_save_result [in A],
_inc_pc [for next instruction]

this micro-instructions mostly are implemented in hardware, (as to perform the loads, it's all about registers, and for the addition we need a complete hardware ALU which makes a binary adition possible. But it depends in the hardware development)

for a multiplication, if you don't have enough hardware (a simple ALU) you need a software implementation with instructions to overcome this lack, as you stated...

But if you re-design your hardware (implement more micro-instructions or a better ALU) and you can make an MUL A,B instruction (which is not a pseudo-instruction or a macro) of course it will be a hardware implementation....

some info also
 

The example that you have provided is correct to distinguish between hardware and software implementations.
But just to emphasize more practical scenario, in the current generation SoC design, to target different market segments, lots of configur-ability is required in the hardware through registers.
So software implementation is done to program these configure registers in different ways based on the interrupts/status registers that are built in hardware to achieve the required goal.
The biggest advantage of this approach is, with the common source of hardware implementation, one can support different markets - say for example high-end vs low-end, better performance vs average performance etc.
At the same time, while implementing the hardware, the designer should keep in mind the firmware support.
Sometimes, additional features itself can be implemented through software, like the "mult" example you have provided.

The hardware and firmware (software) oriented implementation is very common in the current generation system design.
 

The example that you have provided is correct to distinguish between hardware and software implementations.
But just to emphasize more practical scenario, in the current generation SoC design, to target different market segments, lots of configur-ability is required in the hardware through registers.
So software implementation is done to program these configure registers in different ways based on the interrupts/status registers that are built in hardware to achieve the required goal.
The biggest advantage of this approach is, with the common source of hardware implementation, one can support different markets - say for example high-end vs low-end, better performance vs average performance etc.
At the same time, while implementing the hardware, the designer should keep in mind the firmware support.
Sometimes, additional features itself can be implemented through software, like the "mult" example you have provided.

The hardware and firmware (software) oriented implementation is very common in the current generation system design.

Could you provide some simple examples please?
Thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top