Script to create Verilog top level module

Status
Not open for further replies.

beowulf

Member level 4
Joined
Jan 19, 2005
Messages
69
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
581
Hi all,
This might be the most comon problem/task for ASIC engineers. I need a script that will generate a top level module for 'n' verilog modules (in 'n' files)

Say I have A.v & B.v. The script should generate a ABTop.v such that

module ABTop(
clk
:
:
);

input clk;
input (etc etc)
:
:
output (etc etc)
:
:

A A_i (
.clk (clk)
:
:
:
);

B B_i (
.clk (clk)
:
:
:
);

endmodule

This can be a perl, tcl, shell script...Any pointers will be helpful

Thanks,
B
 

I think U shud read design file so that u get module name.. this name shud be used for instantiation !!

perl is easy for pattern matching. read all inputs n outputs from design file n u can creat TOP module file..
 

The logic is not an issue, I just wanted to know if somebody has done this already (its a common problem) so the wheel need not be reinvented.

btw, readers of this post can take a look at a tool called Topweaver (just google topweaver) which is a GUI based top level module creator. Pretty neat, but a script based tool will be nicer.

There was a site called tclforeda.com which supposedly had such tools, but the site doesnt exist anymore...

Thanks,
B
 

beowulf said:
There was a site called tclforeda.com which supposedly had such tools, but the site doesnt exist anymore...

Thanks,
B

Try www.tclforeda.org

Also Emacs with AUTOINST can do what you are looking for.

Ajeetha, CVC
www.noveldv.com
 

    beowulf

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…