Difference Between C And VHDL

Pages

  • VHDL FAQs
  • Example Codes
  • About me
  • Contact Me
  • Disclaimer
Contact me if you want help with VHDL tutoring!

Saturday, February 12, 2011

Difference between C and VHDL

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.
  1. 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.
  2. C can only handle sequential instructions. VHDL allows both sequential and concurrent executions.
  3. 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.
  4. 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.
These are some of the main points. If you have anything to add, feel free to add them in the comment section.

7 comments:

  1. AnonymousFebruary 16, 2011 at 10:25 PM

    one more thing :: why things are faster in HDL?

    ReplyDeleteReplies
      Reply
  2. vipinFebruary 16, 2011 at 11:00 PM

    @hank: In C we are using the code to run on a microprocessor which is used for general purposes.But 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.

    ReplyDeleteReplies
    1. UnknownNovember 4, 2017 at 11:46 AM

      One more reason is that In c language there is sequential execution of instructions while VHDL can execute sequential as well as Concurrent instructions..

      DeleteReplies
        Reply
    2. Reply
  3. daniel khoMarch 4, 2012 at 7:34 PM

    To 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.

    ReplyDeleteReplies
      Reply
  4. Gautam BhatJuly 10, 2013 at 1:37 PM

    @Vipin, For HDL its a "design" language. It "describes" your circuit. This is the main stumbling block for C programmers.

    ReplyDeleteReplies
      Reply
  5. hitesh kumarDecember 18, 2015 at 4:10 AM

    Difference between c and c++The main difference between C and C++ is, C is the procedure oriented language and C++ is the object oriented language.

    ReplyDeleteReplies
      Reply
  6. UnknownMarch 30, 2017 at 6:10 PM

    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.

    ReplyDeleteReplies
      Reply
Add commentLoad more... Newer Post Older Post Home Subscribe to: Post Comments (Atom)

Translate This Page

Search this blog

Get updates
Subscribe Powered by follow.it

Labels

examples (38) vhdl tips (36) useful codes (31) Behavior level model (12) Gate level model (8) synthesisable (8) xilinx tips (8) state machine (6) testbench (6) block RAM (5) file handling (5) BCD (4) Xilinx (4) core generator (4) fixed point package (4) video tutorials (4) adders (3) arrays and records (3) counters (3) delay (3) flipflops (3) generic (3) interview Q's (3) port mapping (3) real variable (3) 7 segment display (2) coding style (2) for loop (2) functions (2) generate (2) gray code (2) image processing (2) modelsim (2) multipliers (2) random number generator (2) resets (2) vivado (2) xilinx errors (2) xilinx isim (2) BCD converter (1) Buffers (1) C and VHDL (1) CRC (1) FFT (1) FIFO (1) FIR filter (1) Frequency measurement (1) LFSR (1) QSD (1) coe file (1) comparator (1) constants (1) debouncing (1) digital clock (1) distributed RAM (1) dual port ram (1) error (1) fast adder (1) floating point (1) hexadecimal (1) ieee_proposed (1) matrix multiplier (1) memory (1) numeric_std (1) package (1) pipelining (1) polynomial equation (1) power reduction (1) procedure (1) quaternary (1) schematics (1) sensitivity list (1) sequence detector (1) serial (1) signals (1) simulation tool (1) square root (1) stack (1) std_logic (1) synthesis (1) textio (1) unsigned (1) variables (1) vhdl beginners guide (1) vhdl language (1) wait for (1)

Blog Archive

  • ▼  2011 (16)
    • ▼  February 2011 (4)
      • File reading and writing in VHDL - Part 2
      • Be careful when using functions in your code.
      • How to stop using "buffer" ports in VHDL?
      • Difference between C and VHDL

My favorites

  • Verilog Tips and Tricks
  • VHDL Official Website
  • VHDL Usenet group
  • Digital Design and Programming
  • VHDL-2008 Support library

Từ khóa » C Vhdl