T
terabits
Guest
Hi
This may be a very fundamental question.
Well my requirement is i have a module which should be instantiated
multiple times depending upon the `define.
let us say module is m m1 (a,b,c);
`define m4
so i need to instantiate this module 4times
`ifdef m4
`define m3
`define m2
`define m1
m m1(a,b,c);
`ifdef m3
`define m2
`define m1
m m2(a1,b1,c1);
`ifdef m2
`define m1
m m3 (a2,b2,c2);
`ifdef m1
m m4 (a3,b3,c3);
`endif
`endif
`endif
`endif
this looks simple for 4 or 3, if i have to do it for 20 times my code
looks so ugly........
if define is 3 i want to do it 3 times if 2 to 2 times and so on.
hence i did this way this look awkward to me there must be simple
solution for this, any one help me !!!!!
rgds
This may be a very fundamental question.
Well my requirement is i have a module which should be instantiated
multiple times depending upon the `define.
let us say module is m m1 (a,b,c);
`define m4
so i need to instantiate this module 4times
`ifdef m4
`define m3
`define m2
`define m1
m m1(a,b,c);
`ifdef m3
`define m2
`define m1
m m2(a1,b1,c1);
`ifdef m2
`define m1
m m3 (a2,b2,c2);
`ifdef m1
m m4 (a3,b3,c3);
`endif
`endif
`endif
`endif
this looks simple for 4 or 3, if i have to do it for 20 times my code
looks so ugly........
if define is 3 i want to do it 3 times if 2 to 2 times and so on.
hence i did this way this look awkward to me there must be simple
solution for this, any one help me !!!!!
rgds