2.5 Some remarks on MyHDL and Python
To conclude this introductory chapter, it is useful to stress that
MyHDL is not a language in itself. The underlying language is Python,
and MyHDL is implemented as a Python package called myhdl.
Moreover, it is a design goal to keep the myhdl package as
minimalistic as possible, so that MyHDL descriptions are very much
``pure Python''.
To have Python as the underlying language is significant in several
ways:
- Python is a very powerful high level language. This translates
into high productivity and elegant solutions to complex problems.
- Python is continuously improved by some very clever
minds, supported by a large and fast growing user base. Python profits
fully from the open source development model.
- Python comes with an extensive standard library. Some
functionality is likely to be of direct interest to MyHDL users:
examples include string handling, regular expressions, random number
generation, unit test support, operating system interfacing and GUI
development. In addition, there are modules for mathematics, database
connections, networking programming, internet data handling, and so
on.
- Python has a powerful C extension model. All built-in types are
written with the same C API that is available for custom
extensions. To a module user, there is no difference between a
standard Python module and a C extension module -- except
performance. The typical Python development model is to prototype
everything in Python until the application is stable, and (only) then
rewrite performance critical modules in C if necessary.
About this document