mirror of https://github.com/lnis-uofu/SOFA.git
[Testbench] Adapt path for signal init in testbench converter
This commit is contained in:
parent
fec19ebc55
commit
5235424e83
|
@ -197,7 +197,7 @@ with open(args.post_pnr_testbench, "r") as wp:
|
||||||
# If the current line satisfy the following conditions
|
# If the current line satisfy the following conditions
|
||||||
# It should be modified and outputted to post-PnR Verilog testbenches
|
# It should be modified and outputted to post-PnR Verilog testbenches
|
||||||
# Other lines can be directly copied to post-PnR Verilog testbenches
|
# Other lines can be directly copied to post-PnR Verilog testbenches
|
||||||
line2output = curr_line \
|
line2output = curr_line
|
||||||
#
|
#
|
||||||
# Add post_pnr to top-level module name
|
# Add post_pnr to top-level module name
|
||||||
if (curr_line.startswith("module")):
|
if (curr_line.startswith("module")):
|
||||||
|
@ -275,6 +275,10 @@ with open(args.post_pnr_testbench, "r") as wp:
|
||||||
# Wire the stimuli according to pin assignment
|
# Wire the stimuli according to pin assignment
|
||||||
write_testbench_wrapper_connection(tb_file, pin_data, 25)
|
write_testbench_wrapper_connection(tb_file, pin_data, 25)
|
||||||
|
|
||||||
|
# Correct the path in signal initialization
|
||||||
|
if (re.search(r'\$deposit\(FPGA_DUT', curr_line)):
|
||||||
|
line2output = re.sub(r'\$deposit\(FPGA_DUT', '$deposit(FPGA_DUT.fpga_core_uut', curr_line)
|
||||||
|
|
||||||
if (False == skip_current_line):
|
if (False == skip_current_line):
|
||||||
tb_file.write(line2output)
|
tb_file.write(line2output)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue