HDLGen is a tool for HDL(mainly for Verilog) generation, it enables embedded Perl or Python scripts in Verilog source code, and support Perl style variable anyway, to generate desired HDL in an easy and efficient way.
It supports all syntax and data structure of Perl or Python, and has a few predefined functions for signal define, module instance, port connection etc.
This tool also supports extended API functions in Perl style, for any function or module that you want or have from previous knowledge or project.
HDL and script mixed design file can be any name, while final generated RTL file will be Verilog only( as .v).
This tool can achieve all functions of EMACS veirlog-mode,while support more as emdedded regular-express, IPXACT/XML,Interface,JSON,Hash,and the working mode is very similiar or even idential to HDL design, but not DSL or HLS.
From function or working mode, this tool is much more efficient than commercial integration tools, with zero learning curve.
Copyright 2022~2023 Wilson Chen
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
any feedback, suggestion, requirement, solution, contribution, is always welcome
Different level design can use this tool with different functions a/o inputs/outputs, the main working flow is as below
RTL stitch
Interface manipulate
IPXACT manipulate
Function generation
Based on above functions, this tool can generate a SOC in an easy and flexible way
├── HDLGen.bin # Tool binary for easy adopt
├── HDLGen.pl # Tool source code
├── plugins # Tool plugin funcitons in Perl module
├── Design_Template # custom module design template files
├── test # Source design code for testing
├── cfg # JSON and XML for config
├── incr # necessary design files
├── doc # usage introduction
first you need to set shell ENV of HDLGEN_ROOT, otherwise tool will report error.
plese refer to setenv.sh
then run command as simple as:
cd test
../HDLGen.pl -i NV_NVDLA_CMAC_CORE_mac.src
or ../HDLGen.bin -i NV_NVDLA_CMAC_CORE_mac.src
or ../HDLGen.pl -f ./src.list
for help message you can run:
HDLGen.pl -usage
Suggestion:
You can first run HDLGen.pl, then install any package according to the error message,
or just run HDLGen.bin for results
AutoDef Sample:
AutoInstSig Sample:
AutoWarning Sample:
Verilog Instance Sample:
IPXACT Instance Sample:
JSON Instance Sample:
Design Template File Sample:
For any ASIC or SOC engineer with over 10 years experience, we may hate Verilog sometime, as Verilog HDL's syntax is TOO simple or TOO basic, it's Register Transfer Level description, we're not writing code, we're indeed designing circuit, it's very cool, but sometime we will be bored, especially when instancing module, do wire connections.
We're very excited when seeing System Verilog for design, because some new syntax like structure,for,generator can impove coding efficiency dramatically,but unfortuantely these syntax will really cause pain when debugging, because ability of EDA tools. Evenmore, some time engineer may need to manually change code to workaround EDA tool on RTL or netlist, this really cause risk to projects.
Then, in order to reduce manual work and improve efficiency, we'll try to use script to generate bulk of structural code, or for module/chip integration, the script we tried includes Perl,Python,Shell, or Vim/Emacs language. But, these ways often need manual run a/o copy in flow, it will cause big risk if any version is not aligned or any manual step is missed.
So we will try new different ways, we may study and learn Chisel, SpinalHDL, MyHDL PyHDL, or PyGear recently. But, when we learned, tried, finally we gave up, because they're DSL, they're not HDL! DSL is totally new language, DSL is more like a high level software language, we have to write code in a new style, no Verilog or HDL at all.
We'll ask: is it safe for a project to abandon Verilog HDL? Is it safe for an experienced engineer to abandon previous skills and design logic with non-HDL code? Is it easy or friendly to learn a new language? Is that language widely used or accepted and will evolve in long term? Is that language suitable and safe for IP/SOC/ASIC development? Is there any different way to help us?
Yes, we have a different way! And it is easy to use, smoothly to move, seamlessly to adopt.
The tool is going to support you keep writing HDL while give the ability to improve your efficiency, and with ZERO learning curve, is here, named as "HDLGen".
The way you're going to work is writing Verilog or VHDL code, the tool helps you on most boring tasks: signal define for wire a/o reg, instance modules by connections with auto wire signals defined and easy name change, connect signals with regular expression, instance JSON and IPXACT xml file as simple as HDL code natively. If any task/logic/design which is not friendly written in HDL, then you can use high level script language like Perl or Python for any code or task you want, wherever and whenever in the HDL source file, as long as you know Perl or Python script, or even shell script.
This tool supports standard AMBA bus interfaces natively. This tool also support you to manually define an interface, through SystemVerilog, Verilog, IPXACT or XML, JSON, or Hash array.
If there is any inhouse developed or accumulated design which is common for your designs, you can put as a template in this tool, then instance with any parameters you want by just as simple as one function call in HDL.
*** The most intuitive and effective design is "what you see is what you coding" ***
*** In most cases, Verilog is the most secure design ***
*** At the system level, the use of parameters requires extreme caution ***
*** DSL is really cool ***
*** But Verilog is still the King ***
*** Connection is what you need ***
*** And Fexibility is really helpful ***
Thanks NVIDIA for giving me the chance to know how Perl is powerful to run big ASIC factory,
Thanks NVIDIA's VIVA to let me know how Perl makes Verilog intersting and amazing.
Thanks NVIDIA's open sourced NVDLA as a test source.
This tool was developed from scratch during the special spring time in Shanghai in 2022
The things related to NVIDIA are:
Please kindly let me know if there is any license issue
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. Open source ecosystem
2. Collaboration, People, Software
3. Evaluation model