⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 將VHDL設計轉換成Verilog設計的程式
💻
字号:
The programvhd2vl is a VHDL to Verilog translation program.It targets the translation of synthetisable RTL.While far from complete it supports a usefulsubset of VHDL, sufficient for complex designs.Directory structurereadme // This filesrc // Source code directorylicense // GNU general public license textgrammar // Contains a simplified description of the translator grammarexample // Directory containing a simple VHDL file to test the translatorCompilationSimply go to the src directory and type make.The makefile is particularly simple and it shouldwork on most Unix systems. It has been tested onSun and Linux.Usagevhd2vl <input file> <output file>For example, from the src directory after compilation :vhd2vl ../example/test.vhd test.vKnown problemsThis is my first attempt to use YACC (and it shows :-)).I'm not a sw engineer and I never worked to thedevelopment of commercial sw, so be kind to my effort :-)It is targeted to synthesisable code, so don't even try iton testbenches.The program might fail on something as simple ascomments in the code.This is because I had to tell YACC where to expect commentsand if it finds one where it does not expect one to be it willstop with an error.Another problem is encountered when translating WITHstatements. A commercial VHDL to Verilog translation programI used translated these with nested <cond> ? <op> : <op>; Verilog statements. I didn't like these as they might generatepriority structures during synthesis.A much better solution (adopted here) is to translate WITHstatements into Verilog CASE statements.Unfortunately this requires to fill the sensitivity list ofthe process containing the CASE statement.This is a pain to do automatically but it relatively easy todo manually.Consequently vhd2vl correctly translates a WITH statementinto a Verilog CASE statement, but it leaves the sensitivitylist of the process empty (and outputs a warning).Unless you are a real WITH fan you won't find this a majorproblem.Bit aggregates are not really supported. Only things suchas (others => '0') or (others => '1') are supported (veryuseful when clearing vectors under reset).There are other subtle limitations in the translator, evenwithin the small subset supported. These are due to mymisunderstanding of YACC, VHDL or both as well as YACC's ownlimitations and the shortcuts I took.Consequently vhd2vl might in some cases translate illegalVHDL with no errors. Make sure that the VHDL you want totranslate is correct in the first place by compiling it witha proper compiler.vhd2vl was not written with efficiency (during translation)in mind. This is not required since translation in itselfis pretty straightforward and modern machines have plenty ofmemory and speed.vhd2vl will not properly clear the memory it uses (but theOS will do it when it quits) and it does stupid things suchas sequential searches in symbol tables.Revision historyV 1.0 - First releaseLicensing informationThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.Please review the terms of the license in the license file includedin the distribution.AcknowledgmentsAs I had never used YACC before I had to rely on a variety oftexts and existing programs for clues.Particularly useful was the VHDL to C translator code fromfellow Italian Christian Ghezzi whose code can be found at:Bugs & commentsvhd2vl was tested on VHDL code implementing Triple DES andJPEG codec cores sold by Ocean Logic Pty Ltd.This does not mean it has no bugs, so If you find any or youwant to make suggestions, please contact me on:oceanlogic@yahoo.comI'm very busy, but I'll try to get back to you.Enzo

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -