VHDL Code Metrics

A

Andrew

Guest
Does anyone know of any tools that generate VHDL code metrics? I need
things like number of lines of code, number of comments, amount of
whitespace, etc.

Thanks,

Andrew
 
Assuming you're using a unix line environment:

find . -name "*.vhd" -exec ./Metrix.sh {} \;

--------------------------- Metrix.sh ---------------------
#! /usr/bin/sh
echo "Filename $1"
echo "Lines in file:"
wc -l $1
echo "Lines with comment:"
grep "\-\-" $1 | wc -l
echo "Empty lines:"
egrep "^[ \t]*$" $1 | wc -l
 
Long time ago, I had a pointy haired boss who really used such a script
to evaluate the 'performance' of different designers. :)

Tom
 
Yeah, I'm hoping that is not what my PHB wants such a script for. And
no, I am not the PHB. :)

Does anyone know of any tools that have this as a feature? A simulator
or something? Unfortunately we're a Windows shop so to run a script
like Stephane's I would need to install cygwin on the PHB's computer.
 
Hello

Does anyone know of any tools that have this as a feature? A simulator
or something? Unfortunately we're a Windows shop so to run a script
like Stephane's I would need to install cygwin on the PHB's computer.
I think Emacs' VHDL mode has such a feature. And yes, though it's
originally a Un*x program it has been ported to Windows.

Nicolas
 

Welcome to EDABoard.com

Sponsor

Back
Top