summaryrefslogtreecommitdiff
path: root/src/model_generation.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/model_generation.py')
-rw-r--r--src/model_generation.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/model_generation.py b/src/model_generation.py
index 3df4676..9615f8e 100644
--- a/src/model_generation.py
+++ b/src/model_generation.py
@@ -241,7 +241,10 @@ client_setup_ip='''
int ip_count = 0;
char* my_ip = malloc(16);
- fptr = fopen("/tmp/NGHDL_COMMON_IP.txt", "r");
+ char ip_filename[40];
+ sprintf(ip_filename, "/tmp/NGHDL_COMMON_IP_%d.txt", getpid());
+
+ fptr = fopen(ip_filename, "r");
if (fptr)
{
char line[20];
@@ -258,7 +261,7 @@ client_setup_ip='''
sprintf(my_ip, "127.0.%d.1", (ip_count+1)%256);
}
- fptr = fopen("/tmp/NGHDL_COMMON_IP.txt", "a");
+ fptr = fopen(ip_filename, "a");
if (fptr)
{
fprintf(fptr, "%s\\n", my_ip);