Personal tools

Difference between revisions of "SystemVerilog formatter for our LowRISC-based guidelines (2-3G)"

From iis-projects

Jump to: navigation, search
Line 14: Line 14:
 
The project can be divided in the following sub tasks:
 
The project can be divided in the following sub tasks:
  
Abstract the coding guidelines to a set of '''machine-understandable rules'''
+
* Abstract the coding guidelines to a set of '''machine-understandable rules'''
Use python to check a given source files against '''each rule''' and '''report the line or construct in violation''' with the rule
+
* Use python to check a given source files against '''each rule''' and '''report the line or construct in violation''' with the rule
Create a python tool that applies the rules to the source code and '''produces nicely formatted''' code
+
* Create a python tool that applies the rules to the source code and '''produces nicely formatted''' code
  
 
== Prerequisites ==
 
== Prerequisites ==

Revision as of 18:05, 2 November 2020

Coding conventions are an essential part of every large hardware (and software) project. They guide various non-functional aspects of the project and the source code like file organization, indentation, declarations, code alignment, naming conventions, and many others.

Coding conventions serve very important purposes:

  • Improving maintenance by making the code more familiar to the maintainers
  • Improve readability of the code and ease the process of reviewing code
  • Improving the overall code quality by giving the project a more complete and clean feel
  • Ensuring better compatibility to different tools by encouraging the use of simpler and better-supported constructs

At IIS we use the LowRISC guidelines [1] for systemverilog. Although the effort of following the guidelines continuously while writing new modules is very manageable, it becomes a major hassle when including 3rd-party and ill-formatted into our projects.

Having a tool that automatically formats any systemverilog source code to apply to the coding guidelines of LowRISC would massively reduce the manual refactoring effort while integrating 3rd-party code.

Project Content

The project can be divided in the following sub tasks:

  • Abstract the coding guidelines to a set of machine-understandable rules
  • Use python to check a given source files against each rule and report the line or construct in violation with the rule
  • Create a python tool that applies the rules to the source code and produces nicely formatted code

Prerequisites

Preferably: Experience with Python

Supervisors