Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified nghdl-simulator-source.tar.xz
100644 → 100755
Binary file not shown.
11 changes: 8 additions & 3 deletions src/model_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,8 @@ def createServerScript(self):
self.digital_home = self.parser.get('NGHDL', 'DIGITAL_MODEL')
self.digital_home = os.path.join(self.digital_home, "ghdl")

start_server = open('start_server.sh', 'w')
# Force Unix line endings (LF) to ensure compatibility with bash on WSL/Linux
start_server = open('start_server.sh', 'w', newline='\n')

start_server.write("#!/bin/bash\n\n")
start_server.write(
Expand All @@ -1082,7 +1083,10 @@ def createServerScript(self):

start_server.write("chmod 775 sock_pkg_create.sh &&\n")
start_server.write("./sock_pkg_create.sh $1 $2 &&\n")
start_server.write("ghdl -i *.vhdl &&\n")
# Compile VHDL files in correct dependency order to avoid "sock_pkg has not been analyzed" errors
start_server.write("ghdl -a sock_pkg.vhdl &&\n")
start_server.write("ghdl -a Utility_Package.vhdl &&\n")
start_server.write("ghdl -a Vhpi_Package.vhdl &&\n")
start_server.write("ghdl -a *.vhdl &&\n")
start_server.write("ghdl -a " + self.fname + " &&\n")
start_server.write(
Expand Down Expand Up @@ -1114,7 +1118,8 @@ def createSockScript(self):

# ########### Creating and writing in sock_pkg_create.sh ########### #

sock_pkg_create = open('sock_pkg_create.sh', 'w')
# Force Unix line endings (LF) to ensure compatibility with bash on WSL/Linux
sock_pkg_create = open('sock_pkg_create.sh', 'w', newline='\n')

sock_pkg_create.write("#!/bin/bash\n\n")
sock_pkg_create.write(
Expand Down