UC Santa Cruz UC Santa Cruz Electronic Theses and Dissertations Title Cloud Interface for LiveHD Permalink https://escholarship.org/uc/item/28p3j2nm Author Jobanputra, Rohan Publication Date 2019 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California UNIVERSITY OF CALIFORNIA SANTA CRUZ CLOUD INTERFACE FOR LIVEHD A thesis submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in COMPUTER ENGINEERING by Rohan Jobanputra December 2019 The Thesis of Rohan Jobanputra is approved: Professor Jose Renau, Chair Professor Scott Beamer Professor Chen Qian Quentin Williams Acting Vice Provost and Dean of Graduate Studies Copyright © by Rohan Jobanputra 2019 Table of Contents List of Figures v List of Tables vii Abstract viii Acknowledgments ix 1 Introduction 1 2 LiveHD 3 2.1 Introduction . .4 2.2 Design Flow . .4 2.3 LGraph Database . .5 2.4 Graph Representation . .6 2.5 Interface . .7 2.6 Conclusion . .9 3 Background 10 3.1 What Is Cloud Computing? . 10 3.2 Docker . 11 3.2.1 What Is Docker? . 11 3.2.2 How Does It Work? . 12 3.2.3 Advantages Of Using Docker . 13 3.2.4 Disadvantages Of Using Docker . 13 3.3 Kubernetes . 14 3.3.1 How Does It Work? . 14 3.3.2 Advantages of Using Kubernetes . 16 3.3.3 Disadvantages Of Using Kubernetes . 16 3.3.4 Difference Between Kubernetes And Docker . 17 3.4 Google Cloud vs AWS . 17 3.5 Wake.................................. 19 iii 3.5.1 How Does It work? . 19 3.5.2 Advantages Of Using Wake . 19 3.6 Bazel . 20 3.6.1 How Does It Work? . 20 3.6.2 Advantages Of Using Bazel . 20 3.7 gg - The Stanford Build System . 21 3.7.1 How Does It Work? . 21 3.7.2 Advantages Of Using gg ................... 23 3.7.3 Disadvantages Of Using gg .................. 23 3.8 Conclusion . 24 4 Intergrating LiveHD With gg 25 4.1 Requirements . 25 4.2 Implementaion . 26 4.2.1 Setup . 26 4.2.2 Testing gg ........................... 27 4.3 Conclusion . 36 5 Conclusion and Future Work 37 5.1 Things That Worked . 38 5.2 Improvements That Need To Be Made . 38 5.3 Need For Parallel Transformations . 39 5.3.1 Goal . 39 5.3.2 Challenges And Potential Solution . 40 5.4 Final Remarks . 40 Bibliography 42 iv List of Figures 2.1 LiveHD Framework . .3 2.2 The overall RTL flow when an LGraph is generated . .5 2.3 The LGraph Database . .6 2.4 The LGraph adjacency list . .7 2.5 A simple Verilog Example. .8 2.6 An InOu yosys command which transforms a Verilog file to an LGraph database. .8 3.1 An example of a Docker Container . 12 3.2 Kubernetes Architecture . 15 3.3 The gg engine . 22 3.4 The gg build process . 23 4.1 A Hello World example . 27 4.2 A Makefile for Hello World . 28 4.3 Running Hello World . 28 4.4 Running Hello World using gg..................... 29 4.5 Current files in the directory. 30 4.6 A C++ program (main.cpp) that reads an input file and writes to an output file. 31 4.7 The script needed to generate a thunk for the program. 32 4.8 LiveHD Yosys InOu Test case. 33 4.9 Current list of files in lgdb. 33 v 4.10 Bash script to generate a thunk. 34 4.11 A C++ program written to open lgshell and pass a command. 35 5.1 Serial vs Parallel LGraph transformations. 39 vi List of Tables 2.1 Some LGraph commands and their functionality. .8 3.1 Kubernetes vs Docker . 17 3.2 AWS vs Google Cloud . 18 3.3 Wake vs Bazel vs gg.......................... 24 vii Abstract Cloud Interface for LiveHD by Rohan Jobanputra There is an increasing demand in the world of cloud computing and for good reason. Cloud computing has opened up a world of possibilities including easy web hosting, fast computation, and the ability to store unlimited data on the cloud. Gone are the days where a user would have to buy expensive hardware to meet their computing needs. LiveHD is an open-source framework designed for fast simulation and syn- thesis. It supports multiple hardware description languages such as Verilog and Pyrope. It also supports other open-source tools such as Yosys, ABC, OpenTimer, and Mockturtle. My small contribution to the project was to figure out a way to use the power of cloud computing to produce these simulation and synthesis results. There is a promising open-source tool called gg, which is being developed by Stanford University. This tool makes it easy to build and run applications on the cloud, so it would make sense to use gg with LiveHD. This process of integration will be discussed in this thesis. viii Acknowledgments Firstly, I’d like to thank my advisor Professor Jose Renau for allowing me to work in his lab. I took his logic design class with Verilog (CMPE 125) when I was an undergraduate student at UC Santa Cruz, and I learned a lot from that class. That was one of the primary reasons why I asked him to be my graduate advisor. I want to thank him for all his hard work and his continuous support throughout my graduate career. I’d also like to thank Professor Scott Beamer and Professor Chen Qian at UC Santa Cruz for providing feedback for this thesis and helping me improve on it. I’d like to thank all my friends at UC Santa Cruz who helped me throughout my undergraduate and graduate career: Pranav, Tanvir, Wuyuan, Rho and Harsh. I’m grateful to have them in my life, and I couldn’t have done this without them. Special thanks for Sadjad Foulad for answering my questions about gg. I’d like to thank my parents for their continuous support, and all the sacrifices they have had to make to ensure their children could live a better life. Lastly, I’d like to thank my brother, Anand, without whom, none of this would have been possible. We grew up together, and he has always been there for me through thick and thin and has helped me achieve many of my personal goals. He is not only the best brother anyone could ask for, but also a great mentor, coach, and a really good friend. I hope I can repay him someday. ix Chapter 1 Introduction Do. Or do not. There is no try. Yoda The current set of hardware synthesis tools take a lot of time to synthesize designs even for minor changes in the design flow. Sometimes it might take hours for even the smallest of changes. This is not very efficient for engineers as they would have to wait a long time to see the results and fix their bugs accordingly. LiveHD aims to improve on that metric by producing synthesis results in a couple of seconds. LiveHD is an open-source graph library developed for live hardware development based on an incremental synthesis model. LiveHD consists of multiple components, the main ones being LGraph (Live Graph) and LNAST (Language neutral AST) [1]. Traditionally, if a programmer wanted to take advantage of more computing power for their applications, they would have to either physically walk into a data center (in the pre-internet era), or log into a server and use their resources. This was not the most efficient way for users to scale up their applications because it would take up too much time and/or cost a lot of money. The internet has opened 1 up a countless number of possibilities, one of them is cloud computing. In today’s world, the need for cloud computing has increased drastically, mainly because it offers better scalability, better security, and is easier to use than traditional data centers. According to a 2019 study, 83 percent of enterprise workloads will be on the cloud by 2020, and 94 percent of enterprises already use a cloud service today [2]. This goes to show the increasing rate of demand and adoption for cloud computing. Since the goal of LiveHD is to produce synthesis and simulation results within a few seconds, it makes sense to use cloud computing in order to speed up the process. However, this process is not easy and poses a few challenges. The main challenge is to account for all dependencies LiveHD needs to make sure it works on the cloud. These dependencies include all the libraries needed for LiveHD and its modules as well as all the input and output files. Accounting for these is challenging and it will be discussed in Chapter 4. Chapter 2 will cover LiveHD and its internals, Chapter 3 will discuss different cloud technologies offered today, and finally, the best way to implement LiveHD functionalities on the cloud will be discussed in Chapter 4. 2 Chapter 2 LiveHD Always pass on what you have learned. Yoda This chapter is about LiveHD which is an open-source graph library that allows the user to represent different phases of the synthesis and physical design flow [3]. LiveHD aims to optimize the live hardware design process by producing synthesis and simulation results within a few seconds. Figure 2.1: LiveHD Framework [1]. Figure 2.1 is a high-level block diagram of the LiveHD framework. Its core component is LGraph, which is a bi-directional graph structure, which means that 3 it allows forward and backward traversals in the nodes. The graph is based on numbered nodes, edges, and a tabular structure.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages53 Page
-
File Size-