I am trying to learn how to pass parameters in Verilog. So far I've learned that the declaration looks like this:
module funct #(parameter n = 32)
(input clk, input [n-1:0]in, input reset, input L,
input load, input shift, output reg[n-1:0] out);
I instantiate another module within that module that depends on the parameter, so I defined the parameter there as well.
module funct2 #(parameter n = 32) (
input clk,
input [n-1:0] in,
input rst,
input L,
output [n-1:0] out
);
My question is how to call funct2 within funct?
I was also wondering how I can instantiate funct within the testbench folder. Without the parameter, it looked like this
funct uut(.clk(clk),.in(in), .reset(reset),.L(L), .load(load), .shift(shift), .out(out));