B
Ben Heard
Guest
comp.lang.verilog,
In the thread "Is there a way to use generics in verilog?" the use of
parameters is mentioned. I believe that in VHDL it is possible to
override selected generics and leave the remaining as default; i.e. you
don't have to provide values for all generics if you only want to change
one.
Is there a way to do this in Verilog? For example
module Timing( Clock, Reset, Out );
parameter FastClockDiv = 4;
parameter SlowClockDiv = 16;
...
To instantiate with the defaults use
Timing T1( .Clock(A), .Reset(B), .Out(C) );
To instantiate overriding both parameters use
Timing #(5, 24) T1( .Clock(A), .Reset(B), .Out(C) );
How do I instantiate just overriding the FastClockDiv and leave
SlowClockDiv as the default from the module?
Thanks,
Ben
In the thread "Is there a way to use generics in verilog?" the use of
parameters is mentioned. I believe that in VHDL it is possible to
override selected generics and leave the remaining as default; i.e. you
don't have to provide values for all generics if you only want to change
one.
Is there a way to do this in Verilog? For example
module Timing( Clock, Reset, Out );
parameter FastClockDiv = 4;
parameter SlowClockDiv = 16;
...
To instantiate with the defaults use
Timing T1( .Clock(A), .Reset(B), .Out(C) );
To instantiate overriding both parameters use
Timing #(5, 24) T1( .Clock(A), .Reset(B), .Out(C) );
How do I instantiate just overriding the FastClockDiv and leave
SlowClockDiv as the default from the module?
Thanks,
Ben