Looking for Verilog "pretty printer"

S

scd

Guest
I'm looking for a program that will fix indentation levels and
cleanup poorly formatted Verilog code.

Prefer open source code.

Thanks,
Scott scd AT teleport DOT com
 
EdA wrote:
emacs will do this - select the region then M-x indent-region

This can be 'batched' but I'm not an expert at that.

/Ed
Make sure you have verilog-mode.el in your elisp directory, and:

emacs --batch -l ~/elisp/verilog-mode.el badcode.v -f verilog-auto -f
verilog-indent-buffer -f save-buffer

To color-highlight the print with two columns:

enscript -G2rj --color -MLetter -Everilog goodcode.v

You can do the same thing with a2ps, but I'm more used to the
commandline options of enscript.

cheers,

jz
 
On Fri, 17 Jun 2005 11:56:54 -0700, soxmax wrote:

to replace those evil tabs with spaces. Whoever invented tabs should be
drug through the streets and stoned to death.
Now hold on just a minute there. I remember when I was a young hacker; my
family used to head into town every month for supplies. We'd bring home a
whole floppy disk filled with big, juicy spaces - 140K of 'em. But we
always ran out after a few weeks. As the youngest, I had to go out in the
snow (barefoot, of course) to collect some wild tabs - scrawny, but they
were all we could find around the farm. And we were damn glad to have 'em,
too.

Sure, nowadays you can get spaces anywhere, and tabs aren't worth the
paper they're printed on. But back then, you knew the value of your ASCII
codes, let me tell you.

Youngsters today just don't know how good they've got it.

Historically yours,
plugh
 
"scd" <scd@nospam.com> wrote in message
news:BkOre.4647$jX6.1261@newsread2.news.pas.earthlink.net...
I'm looking for a program that will fix indentation levels and
cleanup poorly formatted Verilog code.
Not open source. But will clean up your Verilog code.
http://www.semdesigns.com/Products/Formatters/VerilogFormatter.html

SystemVerilog in Beta.


--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
 
emacs will do this - select the region then M-x indent-region

This can be 'batched' but I'm not an expert at that.

/Ed
 
Try gVIM if your are familiar with Linux operating systems. The company
I work for does a lot of embedded systems and Linux operating systems.
I am more familiar with Windows so I had to download Cygwin (a Linux
emulator). I recently came across a Cygwin module called FTE which
really helps clean up C and C++ code as far as lining up braces,
adjusting evil tabs and line breaks, automatically indenting, etc. I'll
bet FTE does well with Verilog also. However, I just use Xilinx ISE
for all of my Verilog coding - you can go to edit -> preferences and
scan down to the bottom to select ISE Text Editor. Then you can select
to replace those evil tabs with spaces. Whoever invented tabs should be
drug through the streets and stoned to death.

All of the above mentioned software is free. Vim, Cygwin and FTE are
open source.

Hope this helps.
Regards
Derek
 
touché. I actually just had a discussion with a co-worker about that
same thing. One of our distributers (Digi-Key) ends all of its part
numbers with "-ND". They have thousands if-not millions of parts. My
argument, ironically, was that it was a waste of disk space and time to
add the -ND. My co-workers argument was that space is free. Have we all
forgotten our roots? I am so ashamed.

Regards
Derek

plugh wrote:
On Fri, 17 Jun 2005 11:56:54 -0700, soxmax wrote:

[ . . . ]
to replace those evil tabs with spaces. Whoever invented tabs should be
drug through the streets and stoned to death.

Now hold on just a minute there. I remember when I was a young hacker; my
family used to head into town every month for supplies. We'd bring home a
whole floppy disk filled with big, juicy spaces - 140K of 'em. But we
always ran out after a few weeks. As the youngest, I had to go out in the
snow (barefoot, of course) to collect some wild tabs - scrawny, but they
were all we could find around the farm. And we were damn glad to have 'em,
too.

Sure, nowadays you can get spaces anywhere, and tabs aren't worth the
paper they're printed on. But back then, you knew the value of your ASCII
codes, let me tell you.

Youngsters today just don't know how good they've got it.

Historically yours,
plugh
 
plugh wrote:
Sure, nowadays you can get spaces anywhere, and tabs aren't worth the
paper they're printed on. But back then, you knew the value of your ASCII
codes, let me tell you.

Youngsters today just don't know how good they've got it.
And why is it that all these modern languages use semicolons all over
the place?

Everybody knows there's nothing better than a good, clean, regular
colon.


A-hem. Excuse me.
 
soxmax wrote:
touché. I actually just had a discussion with a co-worker about that
same thing. One of our distributers (Digi-Key) ends all of its part
numbers with "-ND". They have thousands if-not millions of parts. My
argument, ironically, was that it was a waste of disk space and time to
add the -ND. My co-workers argument was that space is free. Have we all
forgotten our roots? I am so ashamed.
I think Digikey's -ND suffix means "no discount." Presumably, if you
order a large-enough quantity, you get a Good Discount, and the -ND
suffix isn't in your part number.

-a
 
I write a tool, can do this, istyle , pls down at --
http://www.21rf.com/8390/isytle103.rar or
http://crm.51eda.com/soft/embedsys/FPGCPLD/E013_Verilog.rar
 

Welcome to EDABoard.com

Sponsor

Back
Top