In reply to dave_59:
Hi Dave, can you help me with this ?
module top_driver #(parameter START_LANE = 0)
`define LANE_ID(lane_no)\
lane_drv u_lane``lane_no``_drv ()
`LANE_ID(0 + START_LANE) // 0 + parameter set for START_LANE when top_driver instantiated
`LANE_ID(1 + START_LANE)
`LANE_ID(2 + START_LANE)
`LANE_ID(3 + START_LANE)
endmodule
it is giving me compile error as parameter and `define can not work together
error - u_lane0 + START_LANE_drv // creating instance like this
what I want is, whatever LANE number I give when top_driver is instantiated lane_driver should start from that
example if START_LANE is 0, my lane driver should look like this,
u_lane0_drv()
u_lane1_drv()
u_lane2_drv()
u_lane3_drv()
and if START_LANE is 4, my lane driver should be,
u_lane4_drv()
u_lane5_drv()
u_lane6_drv()
u_lane7_drv()