12/06/2024

Install & Run Yosys in Ubuntu Linux 22.04.: Synthesys: EP - 5

 


In this comprehensive article, we delve into a thorough exploration of several key aspects. Initially, we embark on a website tour of Yosys, where we meticulously navigate through its features, functionalities, and interface, ensuring a nuanced understanding. Following this, we extend our exploration to GraphViz, another integral tool, conducting a detailed website tour to grasp its utility and intricacies effectively. Subsequently, we shift our focus to the practical realm, delving into the Yosys GitHub Repository and Documentation, elucidating its significance in facilitating seamless usage and understanding. Moving forward, we embark on a step-by-step guide to installing Yosys on the Ubuntu Linux platform, ensuring accessibility and ease of implementation for viewers. Similarly, we proceed with the installation of GraphViz on Ubuntu Linux, providing clear instructions to enable smooth integration into the operating system. Moreover, we delve into the practical application of Yosys by executing a CMOS behavioral testcase and effectively converting it into an RTL netlist, demonstrating the practical utility of the software. Lastly, we emphasize the importance of post-synthesis analysis by guiding viewers through the installation of TKDIFF and illustrating its application in comparing pre and post-synthesis Verilog netlists, facilitating a comprehensive understanding of the synthesis process.

Install Yosys on Ubuntu Linux:

In the last four episodes, we covered all theories of synthesis in front-end VLSI design. Now  we will- 

1.  install Yosys on Ubuntu Linux,

2.  download a test case from Yosys' GitHub repository, 

3.  execute it with the installed version. 



This is the homepage of Yosys, an open-source synthesis suite. As discussed in previous episodes, Yosys offers extensive documentation, FAQs, and example usage guides. Key resources like papers, slides, and a manual can be downloaded directly from the website.  

We’ll also briefly look at Graphviz, a visualization tool often used alongside Yosys. While we won’t cover Graphviz usage in this article , we’ll ensure it’s installed for later parts.  Installation process for both Yosys and Graphviz will be demonstrated step-by-step using terminal commands.  

Additionally, we’ll explore GitHub to download a sample test case for synthesis. You’ll learn how to parse Verilog files, elaborate design hierarchies, map libraries, and generate the synthesized netlist using Yosys. Finally, we’ll compare the original Verilog code with the synthesized output to understand the transformation.

This article focuses on installation and verification steps; future episodes will delve into detailed synthesis workflows. 

==============================================

All links and resources :  

https://github.com/YosysHQ/yosys https://yosyshq.net/yosys/documentation.html https://yosyshq.net/yosys/download.html https://yosyshq.net/yosys/faq.html https://yosyshq.readthedocs.io/projects/yosys/en/latest/ https://graphviz.org/ https://graphviz.org/download/ https://github.com/YosysHQ/yosys/tree/main/examples/cmos

==============================================

Yosys Download Page: 

 



GraphViz Download Page: 




Yosys Example Page: 


Installing Yosys:



Command  : sudo apt-get install yosys


Installing GraphViz:



Command  : sudo apt-get install graphviz



Running Example:

Commands:

> read_verilog counter.v
> hierarchy -check -top counter.v
> read_verilog -lib cmos_cells.v
> synth
> difflibmap -liberty cmos _cells.lib
> abc -liberty cmos_cells.lib
> opt_clean
> write_verilog synth.v














Installing tkdiff:
Command  : sudo apt-get install tkdiff








Comparing Input and Output file :

Input verilog file : counter.v
Synthesized netlist : synth.v 

Comparison : tkdiff counter.v synth.v






Watch the video lecture here:


Courtesy: Image by www.pngegg.com