| |
| HOME :: JOB
LISTINGS :: WEBCASTS :: ARCHIVES :: MEDIA
KIT :: SUBSCRIBE :: FORUMS
EMBEDDED TECHNOLOGY JOURNAL :: IC JOURNAL |
Introduction Ever since hardware description languages (HDLs) were first put into use to specify electronic designs, designers have recycled code. New insights into the use of these HDLs for design are gained by copying and modifying – with the requisite permissions of course – existing examples. By placing that code into the new designs, everybody saves time since designers do not needlessly re-invent an existing block of code. Someone spent significant time and energy to design that code block and other designers rightfully want to leverage that work. Until the entire design community, standards groups and EDA vendors can deliver a methodology and supporting tools that enable designers to create code for reuse in an automatic and efficient manner, the recycling of existing code will certainly continue. This recycling occurs over a whole spectrum:
In all these cases, code is recycled that probably was never originally meant to be used “as-is” as reusable code. This implies that there is some work involved in recycling the code. The key to recycling is to quickly figure out how much work is required in order to decide whether or not recycling is practical. Determine Design Integrity Design integrity fundamentally means that all the code is complete and ready for simulation. If the code has successfully been used in a product, designers should have a higher level of comfort that the code is complete. However, when faced with a directory of data to recycle, they need to figure out what files are necessary and which ones can be discarded for their new project. Finally, they need to figure out the integrity of the remaining files. Typically, the first step is to find the top level of the design in order to ascertain which files comprise the design description from the root of the design on down. Additionally, designers can eliminate any extraneous files from the project, since extra files are the hardest to deal with and they can include design variants, experimental blocks and the output of design tools that are not required for the new project. Dealing with Missing Files On the surface, missing files can be a signal that the design is not worthy of recycling and this can shake a designer’s confidence that this code was ever used in production. However, deeper analysis is required:
Dealing with Errors Again, if designers see syntax or semantic errors, the tendency is to walk away from the code. However, deeper analysis is required here as well:
Understanding the Design Designers can understand what the code does by using a tool that allows visualization techniques. These tools can generate a spreadsheet or block diagram view outlining the top-level structure of the design. Designers can then visualize the lower level blocks as tables, block diagrams, finite state machines or flowcharts. These tools can also convert code to graphics allowing designers to edit and generate VHDL or Verilog. So, if a missing design block is found, it can be quickly created.
Figure 1: Visual Representation of RTL Code Aid in Understanding the Design. Determine Code Quality Assuming that the code passed initial checks, quality is the next consideration. To automate code quality assessment, designers can use tools to perform this. Often, a company has a set of reuse rules commonly based on the Reuse Methodology Manual. Separately, companies capture rules that represent collective knowledge about code that can cause design errors. Most tools will also score the code by using weights for each rule. Figure 2 shows an example of design quality results.
Figure 2: Code Quality Assessment Results Based on Design Rules. In this example, the code scored an 89% rating. Most of the problems were due to Code Reuse violations. Code quality typically is categorized by:
Establish Design Validity The most time spent in a project is typically validating code; whether it is new code or recycled code. At this stage, designers are tying to ensure that the recycled code functions as expected. Verification is a complex process that can require many techniques and tools. For quick evaluation of the recycled code, designers need to establish some simple “markers” that help them decide the validity of the code, instead of actually performing the process:
Conclusion The method of recycling code in order to accelerate design projects promises to remain a common practice. What is uncommon is a technique to determine, within a day’s time, whether or not a piece of code is worthy of reuse. This article outlines some basic guidelines to help validate whether the initial estimate of the time savings due to recycling code actually will be realized. Designers establishing their own recycling methodology now encourage a new method for thinking about the problem and that allows them to identify the tools needed to automate the process. As they work with automation techniques and tools, designers will gravitate towards a design flow that naturally enables developing code for reuse. Eventually, they realize that they are actually designing new code for reuse as an effect of employing practical recycling techniques.
by Tom Dewey, technical marketing engineer, Design Creation and Synthesis Division, Mentor Graphics Corporation June 6, 2006 Comments on this article? Send them to comments@fpgajournal.com |
All
material on this site copyright © 2003-2009 techfocus media, inc.
All rights reserved.
FPGA and Structured ASIC Journal Privacy Statement |