Posted by mike keating on May 5th, 2009
Much of the RTL that I see – especially older legacy RTL – is completely unstructured. It appears (at least at first glance) to be randomly placed combational and sequential processes – always @(*), assign, and always @(posedge clk) statements. Whatever structure is in the code is defined by the position of the statements and surrounding comments. This is exactly what assembly language code looks like. And we have 30 year + experience that tells us that such unstructured code is a disaster. Modern software languages provide a rich set of construct to facilitate structured code – functions, classes, structs, unions, etc.
With the introduction of SystemVerilog, many of these same tools are available for writing structured RTL. Now we need to start using them, and migrating away from the chaotic assembly-level coding of the past.
Here is Chapter 2 of the Art of Good Design. This chapter starts outlining the process by which we migrate to structured RTL. As always, comments are more than welcome!