Font Size: a A A

Describing And Testing Hardware Designs Using Scala

Posted on:2017-02-13Degree:MasterType:Thesis
Country:ChinaCandidate:Y LiFull Text:PDF
GTID:2428330590491623Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In the past decade,the improvements on high-end CPUs have levelled-off in terms of clock frequencies.Therefore,people have been increasing their processing capacity by employing multi-core or multi-processing paradigms.FPGA has gained momentum in the circumstances,for its great parallel potentials and high customizability.However,developments on FPGAs are severely constrained by the languages and tools that are currently used,due to their limited expressivity,etc.Some methods have been proposed to solve the problem by utilizing soft-ware programming languages,but these methods either do not make good enough use of the languages,or offer limited customizability.In this paper,we propose a novel design to enable hardware designers to use a variety of ad-vanced features provided by software programming languages to describe and test their designs,without compromising the fine-grained control on hardware resources.To prove the feasibility of this approach,we implemented ScalaHDL,an embedded domain-specific language based on modern multi-paradigm programming language Scala.ScalaHDL can be used to describe hard-ware designs and automatically generate synthesizable Verilog code.A built-in cycle-accurate simulator can be used to verify the functionality of such design,and the verifications can be automated by using Scala testing frameworks.ScalaHDL also enables hardware designers to use a variety of code reuse mechanisms in describing hardware designs,and to utilize different implementations hidden in a uniform abstract interface of one operation to generate different design under different constraints or requirements.By utilizing the static type system provided by Scala,ScalaHDL can also expose certain bugs of the hardware descriptions at compile time so hardware designer can fix them at an early stage.Furthermore,ScalaHDL can be easily extended.Our experiments show that using ScalaHDL can achieve a similar level of granularity with Verilog in terms of controlling hardware resources.ScalaHDL can also provide great help in describing and maintaining hardware designs:for hardware designs with repeated internal pat-terns,ScalaHDL can greatly reduce the burdens on coding and maintenance;for simple hard-ware modules or designs composed of different modules,ScalaHDL can also help hardware designers write code that is easier to read and maintain.
Keywords/Search Tags:Scala, FPGA, programming language
PDF Full Text Request
Related items