From 8b3e79766c4c0a78212fbc51ffb948daffb4ffac Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 29 May 2020 18:07:21 -0600 Subject: [PATCH] add fast configuration option to fpga_verilog to speed up full testbench simulation --- openfpga/src/base/openfpga_verilog.cpp | 2 + .../src/base/openfpga_verilog_command.cpp | 3 + openfpga/src/fpga_verilog/verilog_api.cpp | 1 + .../verilog_testbench_options.cpp | 8 +++ .../fpga_verilog/verilog_testbench_options.h | 3 + .../fpga_verilog/verilog_top_testbench.cpp | 63 +++++++++++++++-- .../src/fpga_verilog/verilog_top_testbench.h | 1 + ...onfiguration_frame_example_script.openfpga | 2 +- .../full_testbench_example_script.openfpga | 68 +++++++++++++++++++ .../configuration_frame/config/task.conf | 2 +- 10 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 openfpga_flow/OpenFPGAShellScripts/full_testbench_example_script.openfpga diff --git a/openfpga/src/base/openfpga_verilog.cpp b/openfpga/src/base/openfpga_verilog.cpp index c67c270eb..926e0f8d3 100644 --- a/openfpga/src/base/openfpga_verilog.cpp +++ b/openfpga/src/base/openfpga_verilog.cpp @@ -67,6 +67,7 @@ int write_verilog_testbench(OpenfpgaContext& openfpga_ctx, CommandOptionId opt_output_dir = cmd.option("file"); CommandOptionId opt_reference_benchmark = cmd.option("reference_benchmark_file_path"); CommandOptionId opt_print_top_testbench = cmd.option("print_top_testbench"); + CommandOptionId opt_fast_configuration = cmd.option("fast_configuration"); CommandOptionId opt_print_formal_verification_top_netlist = cmd.option("print_formal_verification_top_netlist"); CommandOptionId opt_print_preconfig_top_testbench = cmd.option("print_preconfig_top_testbench"); CommandOptionId opt_print_simulation_ini = cmd.option("print_simulation_ini"); @@ -81,6 +82,7 @@ int write_verilog_testbench(OpenfpgaContext& openfpga_ctx, options.set_reference_benchmark_file_path(cmd_context.option_value(cmd, opt_reference_benchmark)); options.set_print_formal_verification_top_netlist(cmd_context.option_enable(cmd, opt_print_formal_verification_top_netlist)); options.set_print_preconfig_top_testbench(cmd_context.option_enable(cmd, opt_print_preconfig_top_testbench)); + options.set_fast_configuration(cmd_context.option_enable(cmd, opt_fast_configuration)); options.set_print_top_testbench(cmd_context.option_enable(cmd, opt_print_top_testbench)); options.set_print_simulation_ini(cmd_context.option_value(cmd, opt_print_simulation_ini)); options.set_explicit_port_mapping(cmd_context.option_enable(cmd, opt_explicit_port_mapping)); diff --git a/openfpga/src/base/openfpga_verilog_command.cpp b/openfpga/src/base/openfpga_verilog_command.cpp index 99ee7a319..89c4e27e3 100644 --- a/openfpga/src/base/openfpga_verilog_command.cpp +++ b/openfpga/src/base/openfpga_verilog_command.cpp @@ -79,6 +79,9 @@ ShellCommandId add_openfpga_write_verilog_testbench_command(openfpga::Shell