summaryrefslogtreecommitdiff
path: root/src/model_generation.py
diff options
context:
space:
mode:
authorrahulp132020-07-17 21:03:14 +0530
committerrahulp132020-07-17 21:03:14 +0530
commit30678928c1746176de9923025b012c370fd28e0a (patch)
treec24529aec611dc1ca6b3732562bc5b3ceb4dca61 /src/model_generation.py
parent915f516628ff87be7b1c4ab41fc075e016ff9e4f (diff)
downloadnghdl-30678928c1746176de9923025b012c370fd28e0a.tar.gz
nghdl-30678928c1746176de9923025b012c370fd28e0a.tar.bz2
nghdl-30678928c1746176de9923025b012c370fd28e0a.zip
flake8 compliant and visual indent
Diffstat (limited to 'src/model_generation.py')
-rw-r--r--src/model_generation.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/model_generation.py b/src/model_generation.py
index 7baecc1..f19a5c9 100644
--- a/src/model_generation.py
+++ b/src/model_generation.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python3
-
import re
import os
from configparser import SafeConfigParser
@@ -289,11 +287,13 @@ class ModelGeneration:
if os.name == 'nt':
client_setup_ip += '''
- sprintf(ip_filename, "C:/Windows/Temp/NGHDL_COMMON_IP_%d.txt", getpid());
+ sprintf(ip_filename, ''' \
+ '''"C:/Windows/Temp/NGHDL_COMMON_IP_%d.txt", getpid());
'''
else:
client_setup_ip += '''
- sprintf(ip_filename, "/tmp/NGHDL_COMMON_IP_%d.txt", getpid());
+ sprintf(ip_filename, "/tmp/NGHDL_COMMON_IP_%d.txt",''' \
+ ''' getpid());
'''
client_setup_ip += '''
@@ -495,8 +495,8 @@ class ModelGeneration:
\t\t\telse if(*key_iter=='1')\n\t\t\t{\n\
\t\t\t\t_op_" + item.split(':')[0] + "[Ii]=ONE;\n\
\t\t\t}\n\t\t\telse\n\t\t\t{\n\
- \t\t\t\tfprintf(log_client,\"Unknown value return from server \\n\");\n\
- \t\t\t\tprintf(\"Client-Unknown value return \\n\");\n\t\t\t}\n\n\
+ \t\t\t\tfprintf(log_client,\"Unknown value return from server \\n\");\
+ \n\t\t\t\tprintf(\"Client-Unknown value return \\n\");\n\t\t\t}\n\n\
\t\t\tif(ANALYSIS == DC)\n\t\t\t{\n\
\t\t\t\tOUTPUT_STATE(" + item.split(':')[0] + "[Ii]) = _op_" + item.split(':')[0] + "[Ii];\n\
\t\t\t}\n\t\t\telse if(_op_" + item.split(':')[0] + "[Ii] != _op_" + item.split(':')[0] + "_old[Ii])\n\
@@ -555,8 +555,11 @@ class ModelGeneration:
self.digital_home = self.parser.get('NGSPICE', 'DIGITAL_MODEL')
self.msys_home = self.parser.get('COMPILER', 'MSYS_HOME')
cmd_str2 = "\\'start_server.sh %d %s\\'" + "\\" + "\""
- cmd_str1 = os.path.normpath("\"cd " + self.digital_home + "/" + self.fname.split(
- '.')[0] + "/DUTghdl/ && " + self.msys_home + "/bash.exe -c ")
+ cmd_str1 = os.path.normpath(
+ "\"cd " + self.digital_home + "/" +
+ self.fname.split('.')[0] + "/DUTghdl/ && " +
+ self.msys_home + "/bash.exe -c "
+ )
cmd_str1 = cmd_str1.replace("\\", "/")
cfunc.write('\t\tsnprintf(command,1024, "start /min cmd /c ' +
'\\' + cmd_str1 + cmd_str2 + ' &", sock_port, my_ip);')
@@ -1072,7 +1075,8 @@ class ModelGeneration:
if os.name == 'nt':
start_server.write("ghdl -e -Wl,ghdlserver.o " +
- "-Wl,libws2_32.a " + self.fname.split('.')[0] + "_tb &&\n")
+ "-Wl,libws2_32.a " +
+ self.fname.split('.')[0] + "_tb &&\n")
start_server.write("./"+self.fname.split('.')[0]+"_tb.exe")
else:
start_server.write("ghdl -e -Wl,ghdlserver.o " +