MyHDL: a Python-Based Hardware Description Language
MyHDL supports waveform viewing, a popular way to visualize hardware behavior. In Listing 2, the instantiation of the SPI slave module is wrapped in a call to the function traceSignals. As a side effect, signal changes are dumped to a file during simulation, in a standard format. Figure 1 shows a sample of the waveforms rendered by gtkwave, an open-source waveform viewer.
MyHDL is a practical solution with links to other HDLs. MyHDL supports co-simulation with other HDL simulators that have an interface to the operating system. A bridge must be implemented for each simulator. This has been done for the open-source Verilog simulators Icarus and cver.
In addition, an implementation-oriented subset of MyHDL code can be converted automatically into Verilog. This is done with a function called toVerilog, which is used in the same way as the traceSignals function described earlier. The resulting code can be used in a standard design flow, for example, to synthesize it automatically into an implementation.
Tim Peters, a famous Python guru, explains his love for Python with the paradoxical statement, “Python code is easy to throw away.” In the same spirit, MyHDL aims to be the hardware design tool of choice to experiment with new ideas.
Resources for this article: /article/7749.
Jan Decaluwe has been an ASIC design engineer and entrepreneur for 18 years. Currently, he is an electronic design and automation consultant. He can be reached at firstname.lastname@example.org.
- Readers' Choice Awards 2013
- IBM Will Minimize Impact of Future Disasters
- December 2013 Issue of Linux Journal: Readers' Choice
- Sublime Text: One Editor to Rule Them All?
- RSS Feeds
- Raspberry Pi: the Perfect Home Server
- New Products
- Linux Systems Administrator
- Tech Tip: Really Simple HTTP Server with Python
- Senior Perl Developer
- yes it's Jupiter Broadcasting
43 min 34 sec ago
- nice to see PClinuxOS finally
3 hours 17 min ago
- Personally, I am no longer a
4 hours 13 min ago
- Reply to comment | Linux Journal
17 hours 38 min ago
- It's Jupiter
18 hours 38 min ago
- GIMP is certainly a graphic
19 hours 40 min ago
- Thanks For Your Sharing
1 day 26 min ago
- Studying linux, and looking
1 day 3 hours ago
- voting for Best Linux Distribution
1 day 12 hours ago
- tizen vs android
1 day 16 hours ago