99精品伊人亚洲|最近国产中文炮友|九草在线视频支援|AV网站大全最新|美女黄片免费观看|国产精品资源视频|精彩无码视频一区|91大神在线后入|伊人终合在线播放|久草综合久久中文

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

chisel(一)初識

學FPGA,慢慢來 ? 2019-08-16 16:08 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

這個夏天,一個很奇妙的機會,突然觸碰到一個全新的東西,那就是Chisel。首先感謝 _iChthyosaur的博客 https://blog.csdn.net/qq_34291505/article/details/86744581給予的平臺讓我第一次接觸到這個新鮮的東西,我決定繼續(xù)開始自己的學習之旅,這個系列的博客也不會是簡單的轉述,還是有自己的思考,初次接觸一定還是會有很多理解上的問題,希望大家共同討論共同進步。


初次接觸Chisel,自然先去了解一下這個東西是什么東西


Chisel是什么?


Chisel(讀作[?t?i:z??l]),全名ConstructingHardwarein aScalaEmbeddedLanguage,是由伯克利開發(fā)的硬件構建語言,開源。


官網:https://chisel.eecs.berkeley.edu/index.html


下面是官網上列出的一些特性:


硬件構造語言(非HLS)


嵌入在Scala編程語言中


抽象的數(shù)據(jù)類型和接口


層次化+面向對象+功能化構造


用Scala中的標記來高度參數(shù)化


多時鐘域


大量的標準庫,包括浮點單元


針對ASICFPGA產生低層次的Verilog代碼


github開源,BSD License


什么叫硬件構建語言?是來代替Verilog/SystemVerilog的嗎?


Chisel可以簡單的理解成高度抽象的、高度參數(shù)化的Verilog生成器,利用Scala語言的語法糖,來快速高效的開發(fā)硬件設計。設計完成后,自動生成Verilog,再經由傳統(tǒng)的數(shù)字IC設計方法(邏輯綜合、APR)變成芯片。


我們注意幾點:


Chisel是基于Scala,也可以說Chisel是用Scala語言寫的針對硬件開發(fā)的庫。用Chisel語言做設計就是在寫Scala語言的程序。有點類似UVM是SystemVerilog語言的驗證框架庫。


Chisel的應用專注在前端設計,提高設計的效率。


生成的Verilog是低層次的,也就是類似門級的。


目前仍然通過DC或者Genus來綜合。


與HLS有明顯區(qū)別,不能直接變成工藝相關的門級電路。也許以后會增加這種功能,得看相關EDA的發(fā)展。


那Chisel相比Verilog有什么優(yōu)勢?


抽象程度高、高度參數(shù)化


前端設計周期縮短


可以走敏捷開發(fā)流程


除了可以生成Verilog,還可以生成C/CPP。


都說Chisel開發(fā)快,那具體有哪些語法特性?


各種變量類型可以轉換


位寬可以自動推斷


與Verilog一樣可以方便的取位和拼接


加減法可以防溢出


可以檢查敏感信號列表,防止生成latch


可以以黑盒子的方式調用Verilog,或者以in-line的方式嵌入Verilog


靈活高效的接口定義,再也不需要AUTOARG


可以定義多套不同的實現(xiàn),比如FPGA和ASIC定義不同的RAM


可以處理多時鐘域,處理異步信號的同步


而這樣介紹Chisel:


Chisel (Constructing Hardware In a Scala Embedded Language) is a hardware construction language embedded in the high-level programming language Scala. At some point we will provide a proper reference manual, in addition to more tutorial examples. In the meantime, this document along with a lot of trial and error should set you on your way to using Chisel. Chisel is really only a set of special class definitions, predefined objects, and usage conventions within Scala, so when you write Chisel you are actually writing a Scala program that constructs a hardware graph. However, for the tutorial we don't presume that you understand how to program in Scala. We will point out necessary Scala features through the Chisel examples we give, and significant hardware designs can be completed using only the material contained herein. But as you gain experience and want to make your code simpler or more reusable, you will find it important to leverage the underlying power of the Scala language. We recommend you consult one of the excellent Scala books to become more expert in Scala programming.


首先Chisel是含于高級語言Scala之中,而且 Chisel實際上只是Scala中的一組特殊類定義,預定義對象和使用約定,因此當您編寫Chisel時,您實際上正在編寫構建硬件圖的Scala程序


Through the tutorial, we format commentary on our design choices as in this paragraph. You should be able to skip the commentary sections and still fully understand how to use Chisel, but we hope you'll find them interesting.


We were motivated to develop a new hardware language by years of struggle with existing hardware description languages in our research projects and hardware design courses. Verilog and VHDL were developed as hardware simulation languages, and only later did they become a basis for hardware synthesis. Much of the semantics of these languages are not appropriate for hardware synthesis and, in fact, many constructs are simply not synthesizable. Other constructs are non-intuitive in how they map to hardware implementations, or their use can accidently lead to highly inefficient hardware structures. While it is possible to use a subset of these languages and still get acceptable results, they nonetheless present a cluttered and confusing specification model, particularly in an instructional setting.


However, our strongest motivation for developing a new hardware language is our desire to change the way that electronic system design takes place. We believe that it is important to not only teach students how to design circuits, but also to teach them how to design circuit generators ---programs that automatically generate designs from a high-level set of design parameters and constraints. Through circuit generators, we hope to leverage the hard work of design experts and raise the level of design abstraction for everyone. To express flexible and scalable circuit construction, circuit generators must employ sophisticated programming techniques to make decisions concerning how to best customize their output circuits according to high-level parameter values and constraints. While Verilog and VHDL include some primitive constructs for programmatic circuit generation, they lack the powerful facilities present in modern programming languages, such as object-oriented programming, type inference, support for functional programming, and reflection.


Instead of building a new hardware design language from scratch, we chose to embed hardware construction primitives within an existing language. We picked Scala not only because it includes the programming features we feel are important for building circuit generators, but because it was specifically developed as a base for domain-specific languages.


對于如何使用Chisel表達


While Chisel focuses on binary logic, Chisel can support analog and tri-state wires with the Analog type - see Datatypes in Chisel.


We focus on binary logic designs as they constitute the vast majority of designs in practice. Tri-state logic are poorly supported standard industry flows and require special/controlled hard macros in order to be done.



在說Chisel之前首先說Scala語言,Scala是一門基于JVM運行的語言,他與JAVA語言相互兼容,Scala也是一門面向對象的函數(shù)式語言。


而現(xiàn)在對于主流的硬件描述語言還是Verilog,而Verilog一直以來也是有開發(fā)效率低下的弊病。后來對于這個的問題的討論結果是對Verilog進行改良,也就出現(xiàn)了Verilog的后續(xù)標準——SystemVerilog,但是由于它只是用于驗證。但是當時除了改良還有一部分人主張把語言轉移到軟件語言,(C++、Java),支持C++的誕生了SystemC,而對于Chisel就是支持Java的那部分人創(chuàng)造出的


是由加州大學伯克利分校的研究團隊發(fā)布的一種新型硬件語言。據(jù)團隊成員之一Krste Asanovic教授介紹,早在30多年前還沒有硬件描述語言的時候,他們就已經開始構想這樣一種語言了。最開始Chisel是基于Ruby的,但是后來發(fā)現(xiàn)Scala更適合構建Chisel。因為Scala有諸多特性適合描述電路,比如它是靜態(tài)語言,以編譯期為主,適合轉換成Verilog/VHDL。再比如它的操作符即方法、柯里化、純粹的面向對象、強大的模式匹配、便捷的泛型編寫、特質混入、函數(shù)式編程等特性,使得用Scala開發(fā)DSL語言很方便。通過firrtl編譯器可以把Chisel文件轉換成firrtl文件,這是一種標準的中間交換格式,也就是讓各種高級語言方便地轉換到Verilog/VHDL的媒介,但它其實和verilog/VHDL屬于同一層次。在這里,Chisel選擇了妥協(xié),沒有直接生成電路,而是借助Verilog,主要是因為沒有EDA工具支持,因此,它并不等同于HLS(High Level Synthesis)。將來也許會有EDA工具直接支持Chisel。


聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • Chisel
    +關注

    關注

    0

    文章

    7

    瀏覽量

    518
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    初識瑞薩FSP固件庫

    FSP全稱為“Flexible Software Package”,中文譯為“靈活配置軟件包”。
    的頭像 發(fā)表于 07-19 09:21 ?123次閱讀
    <b class='flag-5'>一</b>文<b class='flag-5'>初識</b>瑞薩FSP固件庫

    【Milk-V Duo S 開發(fā)板免費體驗】Milk-V Duo S 開發(fā)板試用報告(1)開箱

    初識 盼啊盼,終于盼來了這塊Milk-V Duo S。先看下Duo S的包裝。(圖1) 圖1 可以看到,外圈有層塑料外殼,并且材質很好,摸起來很順滑。而用普通Milk-V
    發(fā)表于 06-29 19:43

    零死角玩轉STM32——初級篇

    ,從裸奔到系統(tǒng),讓您零死角玩轉 STM32。 目錄內容: 1、如何編譯和下載程序 2、JLINK 驅動安裝與 MDK 環(huán)境搭建 3、如何新建工程模板 4、初識 STM32 庫 5、流水
    發(fā)表于 05-21 13:48

    【米爾-全志T536開發(fā)板試用體驗】 試用測評報-初識T536

    【米爾-全志T536開發(fā)板試用體驗】 試用測評報-初識T536 從電子發(fā)燒友網申請到MYC-LT536核心板及開發(fā)板有段時間了,因為工作中有用到全志V536開發(fā)方案,仔細的對比了這個新出的開發(fā)板
    發(fā)表于 04-23 11:35

    21.5寸觸摸體機:便捷互動的新窗口

    體機
    朗銳智科
    發(fā)布于 :2025年04月10日 15:34:00

    【「芯片通識課:本書讀懂芯片技術」閱讀體驗】初識芯片樣貌

    ) 微控制器(MCU)是小型電子產品和電子系統(tǒng)的控制中心。MCU按照內部程序的存儲形式可分為以下三種類型:掩膜型(Mask)MCU在出廠時,程序已固化在芯片內部,程序功能不可變化;次性編程型(OTP)MCU
    發(fā)表于 03-23 09:47

    汽車電路初識

    章 汽車電路分析基礎第二章 汽車電路圖識讀第三章 典型汽車電器電路分析第四章 汽車電路檢修第五章 汽車電子電路圖識讀
    發(fā)表于 03-10 18:04 ?7次下載

    零基礎開發(fā)小安派-Eyes-S1【進階篇】——初識 LVGL 并搭建最小工程

    AiPi-Eyes-S1 是安信可開源團隊專門為Ai-M61-32S設計的款開發(fā)板,支持WiFi6、BLE5.3。所搭載的Ai-M61-32S 模組具有豐富的外設接口,具體包括 DVP、MJPEG
    的頭像 發(fā)表于 01-06 16:14 ?841次閱讀
    零基礎開發(fā)小安派-Eyes-S1【進階篇】——<b class='flag-5'>初識</b> LVGL 并搭建最小工程

    零基礎開發(fā)小安派-Eyes-S1——初識LVGL并搭建最小工程

    AiPi-Eyes-S1 是安信可開源團隊專門為Ai-M61-32S設計的款開發(fā)板,支持WiFi6、BLE5.3。所搭載的Ai-M61-32S 模組具有豐富的外設接口,具體包括 DVP、MJPEG
    的頭像 發(fā)表于 01-03 14:09 ?909次閱讀

    初識光模塊之光模塊的分類

    高速先生成員--周偉 說到光模塊,很多用過光模塊的人肯定很清楚光模塊有很多種,但還有很多人只是見過或者知道有光模塊,但光模塊具體怎么分類的,我相信很多人都和我們開始接觸光模塊樣都是知半解,甚至
    發(fā)表于 12-10 08:59

    初識光模塊之光模塊的分類

    高速先生成員--周偉 說到光模塊,很多用過光模塊的人肯定很清楚光模塊有很多種,但還有很多人只是見過或者知道有光模塊,但光模塊具體怎么分類的,我相信很多人都和我們開始接觸光模塊樣都是知半解,甚至
    的頭像 發(fā)表于 12-10 08:58 ?934次閱讀
    <b class='flag-5'>初識</b>光模塊之光模塊的分類

    YC-3615充磁測磁體機運行流程#永磁#充磁

    體機
    jf_97022714
    發(fā)布于 :2024年11月19日 08:53:51

    思道SEEKVIEU體機電腦

    體機
    jf_69621499
    發(fā)布于 :2024年09月03日 08:50:17