mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
wrapper generation works
This commit is contained in:
parent
b96f51ccf0
commit
993d109012
@ -30,7 +30,7 @@ lineModuleEnd = 0
|
||||
moduleName = ""
|
||||
|
||||
# string that will keep track of the running module header
|
||||
buf = "`include \"config.vh\"\n`include \"parameter-defs.vh\"\nimport cvw::*;\n"
|
||||
buf = "import cvw::*;\n`include \"config.vh\"\n`include \"parameter-defs.vh\"\n"
|
||||
|
||||
# are we writing into the buffer
|
||||
writeBuf=False
|
||||
@ -56,5 +56,19 @@ for l in lines:
|
||||
buf += f"\t{moduleName} #(P) dut(.*);\nendmodule"
|
||||
|
||||
|
||||
# path to wrapper
|
||||
wrapperPath = f"{os.getenv('WALLY')}/src/wrappers/{moduleName}wrapper.sv"
|
||||
|
||||
# clear wrappers directory
|
||||
os.system(f"rm {os.getenv('WALLY')}/src/wrappers/*")
|
||||
|
||||
fout = open(wrapperPath, "w")
|
||||
|
||||
fout.write(buf)
|
||||
|
||||
fin.close()
|
||||
fout.close()
|
||||
|
||||
|
||||
|
||||
print(buf)
|
Loading…
Reference in New Issue
Block a user