Languages

What are the differences between a programming(C), modelling(Verilog) and scripting language(Perl) right from the basics? (Advantages and limitations)

In reply to ankitsfsj:

Hi,

  1. Level of programming:
    Very low/hardware → HDL languages
    Low (with an existing CPU, hard or soft), still close to the hardware but not defining it. Just using it → C
    High → Most of the time, you don’t even need to manage memory. You code far from the hardware; this type of language just ask you to code your intent and manages a lot of the rest.

  2. Resulting performance:
    HDL gives you a lot of freedom to create very potent hardware implementation IF you know what you are doing.
    C gives you a lot of control on CPUs and memory (compiler translate down to Assembly/ Machine code, which is the lowest level you can go down to)
    Scripted are RELATIVELY slow most of the time (some get the push of a JIT, but still, lot of overhead.)

  3. Compatibility of code:
    HDL: very specific to a given hardware.
    C: specific to a hardware or architecture
    Scripted: run everywhere because it sits on a code optimized for the architecture you are running on. But maybe some optimizations are off.

  4. Ease of use:
    If you are a beginner, start with scripted/interpreted languages: many things are managed for you. You can have a lot of fun without too much hassle. So many libraries are ready made for you…
    If you are running after every nanosecond, know a shortcut to an algorithm, but are on not willing to design your cpu, just use c/c++ (even some versions of fortran) or an equivalent language. If you don’t know how to code, it may not be the best option.
    If you feel hardcore, go HDL and design your hardware according to your application (which could be a cpu, a DSP, an image processing tool… whatever, your are the designer here). You can be king (win) or pawn (checkmate).

In reply to MarkLand:

Thank you for the answer