Skip to content
Snippets Groups Projects
Unverified Commit 92556324 authored by whatmough's avatar whatmough Committed by GitHub
Browse files

Update RTL-Coding-Guidelines.md

parent 6621ae71
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,7 @@ endmodule // my_counter ...@@ -77,7 +77,7 @@ endmodule // my_counter
In addition to these guidelines, we also recommend the strict use of a pre-processor macro for register inference. In addition to these guidelines, we also recommend the strict use of a pre-processor macro for register inference.
This has a number of advantages, including: 1) significant reduction in lines of code, 2) removes the risk of poor inference style, e.g. embedded logic, 3) enforces use of a rising-edge, async active-low reset, 4) allows the register inference template to be changed to suit ASIC or FPGA. This has a number of advantages, including: 1) significant reduction in lines of code, 2) removes the risk of poor inference style, e.g. embedded logic, 3) enforces use of a rising-edge, async active-low reset, 4) allows the register inference template to be changed to suit ASIC or FPGA.
A macro is used instead of a module to reduce simulation overhead. A macro is used instead of a module to reduce simulation overhead.
The CHIPKIT RTL header file (`RTL.svh`) includes a macro definition `\`FF()` for this purpose, which replaces the traditional inference template, as shown in the snippet below. The CHIPKIT RTL header file (`RTL.svh`) includes a macro definition `` `FF()`` for this purpose, which replaces the traditional inference template, as shown in the snippet below.
When using FPGAs with an RTL codebase, this macro can be easily redefined to infer a synchronous reset, which is more common. When using FPGAs with an RTL codebase, this macro can be easily redefined to infer a synchronous reset, which is more common.
```systemverilog ```systemverilog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment