信息教学创新23年2期

集成电路设计与 EDA 技术课程专业能力培养实践 ——RTL 设计的层次化展平处理
杨怡雯,曾梓萱,赵岩,李长庚
(中南大学 物理与电子学院,湖南 长沙 410083)

摘  要:Verilog HDL 作为描述数字电路的通用语言,在大规模设计中一般采用层次化和结构化的设计方法。为了在获得较优的电路面积结果的同时提高综合后输出网表的可读性,使用 Python 和正则表达式对 Verilog 代码进行层次化展平处理,用模块内的设计代码替换实例化语句。打平层次结构后,设计代码变为没有层次的、不带参数、不带可选择配置的扁平链式结构,提高了代码的可维护性。此实践项目难度适中,有助于学生深入理解 Verilog HDL 的语法结构和 EDA 软件的工作原理,提高了学生的设计实践能力。


关键词:正则表达式;Python;代码扁平化;课程教学



DOI:10.19850/j.cnki.2096-4706.2023.02.043


基金项目:湖南省教学改革省级课题(HNJG-2021-0302);中南大学教学改革校级课题(2021jy063)


中图分类号:TP39;G434                                文献标识码:A                               文章编号:2096-4706(2023)02-0171-04


Integrated Circuit Design and EDA Technology Course Professional Ability Training Practice—RTL Design Hierarchical Flattening Processing

YANG Yiwen, ZENG Zixuan, ZHAO Yan, LI Changgeng

(School of Physics and Electronics, Central South University, Changsha 410083, China)

Abstract: As a general language for describing digital circuits, Verilog HDL generally adopts hierarchical and structured design methods in large-scale designs. In order to obtain better circuit area results while improving the readability of the synthesized output netlist, Python and regular expressions are used to hierarchically flatten the Verilog code, replacing instantiated statements with in-module design code. After flattening the hierarchical structure, the design code became a flat chain structure without hierarchy, parameters, optional configuration, which improves the maintainability of the code. The difficulty of this practice project is moderate, which helps students to deep understand the grammatical structure of Verilog HDL and the working principle of EDA software, and improves students' design practice ability.

Keywords: regular expression; Python; code flattening; course teaching


参考文献:

[1] 孙进辉 .EDA 技术在数字电子实验设计中的合理应用分析[J]. 实验室研究与探索,2018,37(2):199-202.

[2] 丁家峰,李新梅,尹林子,等 .EDA 技术中自顶向下方法的教学与实践 [J]. 电气电子教学学报,2020,42(6):91-95.

[3] 丁家峰,李新梅,孙克辉,等 .“EDA 技术与应用”课程教学改革与创新 [J]. 电气电子教学学报,2017,39(6):47-49+59.

[4] 罗杰,康华光 . 两种硬件描述语言 VHDL/Verilog 的发展及其应用 [J]. 电气电子教学学报,2002(4):1-5.

[5] 马彤鑫.基于Python的正则表达式获取字符串信息 [C]//第三十四届中国(天津)2020'IT、网络、信息技术、电子、仪器仪表创新学术会议论文集 . 中国天津:天津市电子学会、天津市仪器仪表学会,2020:299-300.

[6] 张静,张妍 . 正则表达式及其在信息抽取中的应用 [J]. 电脑知识与技术,2009,5(15):3867-3868.


作者简介:杨怡雯(2001—),女,汉族,陕西西安人,本科在读,研究方向:电子信息。