Combination of generate and macro

In reply to dave_59:

Thanks.
I cant change the ddrN to be array (its not my code)
1 can write it manually but its a lot of work.
although Macros are pre-processor compiler directive. surprisingly it did work for the left side.
is there any other way to get the desied code by using system verilog only?
Thanks