mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-22 12:57:23 -04:00
wrapper generation works
This commit is contained in:
parent
801ff63e24
commit
62d7104398
1 changed files with 15 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue