From fb64fc09a83009deaa37de151b1257f1fa627c72 Mon Sep 17 00:00:00 2001 From: ambikeshwar Date: Thu, 13 Aug 2015 15:26:43 +0530 Subject: added shell script to create sock_port.vhdl library --- src/model_generation.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) 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") + + + + + -- cgit