summaryrefslogtreecommitdiff
path: root/src/model_generation.py
diff options
context:
space:
mode:
authorambikeshwar2015-08-13 15:26:43 +0530
committerambikeshwar2015-08-13 15:26:43 +0530
commitfb64fc09a83009deaa37de151b1257f1fa627c72 (patch)
treed8f4589fef50b9ffde9da3bb6dc92507da1d2baf /src/model_generation.py
parent0b18163a841f1c5c985cdfb36ad1c79e662fee89 (diff)
downloadnghdl-fb64fc09a83009deaa37de151b1257f1fa627c72.tar.gz
nghdl-fb64fc09a83009deaa37de151b1257f1fa627c72.tar.bz2
nghdl-fb64fc09a83009deaa37de151b1257f1fa627c72.zip
added shell script to create sock_port.vhdl library
Diffstat (limited to 'src/model_generation.py')
-rwxr-xr-xsrc/model_generation.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/model_generation.py b/src/model_generation.py
index 805db82..676c02d 100755
--- a/src/model_generation.py
+++ b/src/model_generation.py
@@ -756,7 +756,7 @@ for item in process:
testbench.close()
-#####################################Creating and writing components in start_server.sh ################################
+##################################### Creating and writing components in start_server.sh ################################
start_server = open('start_server.sh','w')
@@ -772,3 +772,26 @@ start_server.write("ghdl -e -Wl,ghdlserver.o "+fname.split('.')[0]+"_tb &&\n")
start_server.write("./"+fname.split('.')[0]+"_tb")
start_server.close()
+
+##################################### Creating and writing in sock_pkg_create.sh ########################################
+
+sock_pkg_create = open('sock_pkg_create.sh','w')
+
+sock_pkg_create.write("echo \"#!/bin/bash\n\n")
+sock_pkg_create.write("###This file create sock_pkg_create.vhdl file and set the instance id from parameter based on parameter\n\n")
+sock_pkg_create.write("library ieee;\n")
+sock_pkg_create.write("package sock_pkg is\n")
+sock_pkg_create.write("\tfunction sock_pkg_fun return integer;\n")
+sock_pkg_create.write("end;\n\n")
+sock_pkg_create.write("\tpackage body sock_pkg is\n")
+sock_pkg_create.write("\t\tvariable sock_id : integer;\n")
+sock_pkg_create.write("\t\t\tbegin\n")
+sock_pkg_create.write("\t\t\t\tsock_id := $1;\n")
+sock_pkg_create.write("\t\t\t\treturn sock_id;\n")
+sock_pkg_create.write("\t\t\tend function;\n")
+sock_pkg_create.write("\t\tend package body;\" > sock_pkg.vhdl")
+
+
+
+
+