Nested tick defines usage

In reply to sra1dreddy:

It is always better to use arrays than a series of identifiers. You can either create two separate arrays for the starting and ending addresses, or create an array of a structure

typedef struct {int STADDR,ENDADDR;} range_t;

parameter range_t mem_bank[21] = '{ 0:'{'h0010,'h001F},
                                    1:'{'h0020,'h002F},
                                    2:'{'h0020,'h002F},
                                   19:'{'h0100,'h010F},
                                   20:'{'h0200,'h020F} };
function void gen_addr(input int i);
  addr = $urandom_range(mem_bank[i].ENDADDR, mem_bank[i].STADDR);
endfunction