Problem in splitiing file based on regex using awk/nawk

I have a file tmp.txt as shown below:

Controller: 0
        Disk: 0.0.0
        Disk: 0.1.0
        Disk: 0.2.0
Controller: 1
        Volume:c1t2d0
        Disk: 0.0.0
        Disk: 0.1.0
        Disk: 0.2.0
Controller: 2
        Volume:c2t2d0
        Disk: 0.2.0

Now I want to split the file into 3 files each for one controller.
I got a code snippet from this forum which worked fine.

<tmp.txt awk '/Controller/{i++} {print > "file."i}'

Now, I want to pass the path to awk so that split files get created in that path.
I tried to pass the path to awk:

root@v4u-v445c-gmp03 # <tmp.txt awk -v var=$tmp '/Controller/{i++} {print > var"/file."i}'
awk: syntax error near line 1
awk: bailing out near line 1
root@v4u-v445c-gmp03 #

It seems awk is not allowing to pass variable at all.

root@v4u-v445c-gmp03 # <tmp.txt awk -v var=$tmp '{print $1}'
awk: syntax error near line 1
awk: bailing out near line 1

I tried using nawk (I could pass variable successfully to nawk):

root@v4u-v445c-gmp03 # <tmp.txt nawk -v var=$tmp '{print $1}'
Controller:
Disk:
Disk:
Disk:
Controller:
Volume:c1t2d0
Disk:
Disk:
Disk:
Controller:
Volume:c2t2d0
Disk:
root@v4u-v445c-gmp03 #

But splitting file based on regex is failing if I use nawk:

root@v4u-v445c-gmp03 # <tmp.txt nawk '/Controller/{i++} {print > "file."i}'
nawk: syntax error at source line 1
 context is
        /Controller/{i++} {print > >>>  "file."i <<< }
nawk: illegal statement at source line 1
root@v4u-v445c-gmp03 #

Please suggest me how to get rid of this issue.

working fine..for me try this

awk '/^Controller:/{a++}{print >"file"a".txt"}' Your_file_name

How do I pass a specific path (directory) in awk so that "file"a".txt" gets created at some other location than cwd? That is my problem...

nawk -v var="$tmp" '/Controller/{close(out);out=var "/file." ++i} {print > out}' tmp.txt

use path rather file name..

$awk '/^Controller:/{a++}{print >"/root/my_temp/temp/hello/file"a".txt"}'
$cd /root/my_temp/temp/hello/
$ls 
file1.txt  file2.txt  file3.txt