From 702926504b4749ae26975393fde561f03eb8caf3 Mon Sep 17 00:00:00 2001 From: ambikeshwar Date: Thu, 13 Aug 2015 13:29:07 +0530 Subject: changes done to give client server port number in netlist --- src/model_generation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/model_generation.py') diff --git a/src/model_generation.py b/src/model_generation.py index 4e377d1..38bec4d 100755 --- a/src/model_generation.py +++ b/src/model_generation.py @@ -248,7 +248,7 @@ create_socket=''' // memset(&server_addr, 0, sizeof(server_addr)); server_addr.sin_family = AF_INET; - server_addr.sin_port = htons(5000); + server_addr.sin_port = htons(sock_port); server_addr.sin_addr = *((struct in_addr *)host->h_addr); bzero(&(server_addr.sin_zero),8); @@ -463,7 +463,8 @@ for item in cm_event_get_ptr: cfunc.write("\n") cfunc.write(systime_info) cfunc.write("\n") -cfunc.write('\t\tsystem("'+home+'/ngspice-26/src/xspice/icm/ghdl/'+fname.split('.')[0]+'/DUTghdl/start_server.sh &");\n') +cfunc.write('\t\tsnprintf(command,1024,"'+home+'/ngspice-26/src/xspice/icm/ghdl/'+fname.split('.')[0]+'/DUTghdl/start_server.sh %d &",sock_port);\n') +cfunc.write('\t\tsystem(command)') cfunc.write("\t}") cfunc.write("\n") cfunc.write("\telse\n\t{\n") -- cgit