J
johnp
Guest
I like to declare my modules like
module foo (
input a,
input b,
output c
);
and not use the older
module foo (a, b, c);
input a;
input b;
output c;
Now, one advantage of the older style is that you can sneak an include
statement in
that defines port widths via parameters within the include file:
module foo (a, b, c);
`include "my_params.vh"
input [WIDTH-1:0] a;
input [WIDTH-1:0] b;
output c;
Is there a way to to use the new declaration format, but style have an
`include file
that will have parameters that define signal widths? I realize that
if i use `define
statements, I can put the include file before the module declaration,
but I'd
prefer to stick with parameters.
Also - I know about the format
module foo #(
parameter WIDTH = 1
) (
input [WIDTH-1:0] a,
input [WIDTH-1:0] b,
output c
);
But this doesn't let me use the include file.
Any suggestions?
Thanks!
John Providenza
module foo (
input a,
input b,
output c
);
and not use the older
module foo (a, b, c);
input a;
input b;
output c;
Now, one advantage of the older style is that you can sneak an include
statement in
that defines port widths via parameters within the include file:
module foo (a, b, c);
`include "my_params.vh"
input [WIDTH-1:0] a;
input [WIDTH-1:0] b;
output c;
Is there a way to to use the new declaration format, but style have an
`include file
that will have parameters that define signal widths? I realize that
if i use `define
statements, I can put the include file before the module declaration,
but I'd
prefer to stick with parameters.
Also - I know about the format
module foo #(
parameter WIDTH = 1
) (
input [WIDTH-1:0] a,
input [WIDTH-1:0] b,
output c
);
But this doesn't let me use the include file.
Any suggestions?
Thanks!
John Providenza