It is normally said that once you learn one programming language it is pretty easy to learn the other programming languages. This is because the concepts are almost same in most of the programming languages with some only syntax differences.
But if you ask a hardware engineer, he may have a totally different opinion. If you dont stop thinking from a C programmer's perspective, then life as VHDL programmer will drive you nuts. Because both the languages have many differences between them. Both are different from the basic level itself, though they seem to have many similarities.
So let me compile some of the basic differences between C programming and VHDL programming.
But if you ask a hardware engineer, he may have a totally different opinion. If you dont stop thinking from a C programmer's perspective, then life as VHDL programmer will drive you nuts. Because both the languages have many differences between them. Both are different from the basic level itself, though they seem to have many similarities.
So let me compile some of the basic differences between C programming and VHDL programming.
- C is a middle level language. I mean its a mix of a high level language and an assembly language.
VHDL is a hardware description language(HDL) . It is used for implementing the hardware circuit. - C can only handle sequential instructions.
VHDL allows both sequential and concurrent executions. - A C program can be successfully written with pure logical or algorithmic thinking.
But a successful VHDL programmer needs thorough working knowledge of the hardware circuits. He should be able to predict how a given code will be implemented in hardware. - Normally we don't care about resource usage in C. This is because a C program is usually ran on a computer which uses a powerful processor with high speed. We also don't care about the memory usage.
But when it comes to VHDL a slightly complicated code can make you bent on your knees. The memory and other logic elements are limited in a FPGA(where you normally put the VHDL code in). This is why it is very difficult to implement image processing algorithms in VHDL than in C.
one more thing :: why things are faster in HDL?
ReplyDelete@hank: In C we are using the code to run on a microprocessor which is used for general purposes.
ReplyDeleteBut using HDL, we specify what we want. That means personal optimization is possible using HDL.This is the reason why ASIC chips are developed if the chip has a large demand. Because efficiency will be decreased when systems are implemented on general purpose processors.
One more reason is that In c language there is sequential execution of instructions while VHDL can execute sequential as well as Concurrent instructions..
DeleteTo top up vipin's comment, C code gets compiled to assembly instructions that runs on a microprocessor. The microprocessor itself is usually designed in HDL. So if you're running something on a uP, it has to be some software (the assembly code) running on top of a piece of hardware (designed in HDL). So of course if you design things directly using HDL, your design becomes the hardware itself and doesn't have to "run" on anything. That makes it faster and more efficient.
ReplyDelete@Vipin,
ReplyDeleteFor HDL its a "design" language. It "describes" your circuit. This is the main stumbling block for C programmers.
Difference between c and c++
ReplyDeleteThe main difference between C and C++ is, C is the procedure oriented language and C++ is the object oriented language.
C programming language is a middle level programming language, it provide some low level data manipulation mechanisms like assembly language. C is not specifically designed to simulated circuit diagrams.
ReplyDelete