From ad54c8547e236e720cb82a8e9e711a5810b3c415 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 5 Oct 2021 18:54:02 -0700 Subject: [PATCH] [FPGA-Bitstream] Added an option to ``write_fabric_bitstream`` command to enable outputting don't care bits in bitstream files --- openfpga/src/base/openfpga_bitstream.cpp | 2 ++ .../src/base/openfpga_bitstream_command.cpp | 3 +++ .../write_text_fabric_bitstream.cpp | 26 ++++++++++++++----- .../write_text_fabric_bitstream.h | 1 + 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/openfpga/src/base/openfpga_bitstream.cpp b/openfpga/src/base/openfpga_bitstream.cpp index 315f647bc..ea390ae08 100644 --- a/openfpga/src/base/openfpga_bitstream.cpp +++ b/openfpga/src/base/openfpga_bitstream.cpp @@ -94,6 +94,7 @@ int write_fabric_bitstream(const OpenfpgaContext& openfpga_ctx, CommandOptionId opt_file = cmd.option("file"); CommandOptionId opt_file_format = cmd.option("format"); CommandOptionId opt_fast_config = cmd.option("fast_configuration"); + CommandOptionId opt_keep_dont_care_bits = cmd.option("keep_dont_care_bits"); /* Write fabric bitstream if required */ int status = CMD_EXEC_SUCCESS; @@ -125,6 +126,7 @@ int write_fabric_bitstream(const OpenfpgaContext& openfpga_ctx, openfpga_ctx.fabric_global_port_info(), cmd_context.option_value(cmd, opt_file), cmd_context.option_enable(cmd, opt_fast_config), + cmd_context.option_enable(cmd, opt_keep_dont_care_bits), cmd_context.option_enable(cmd, opt_verbose)); } diff --git a/openfpga/src/base/openfpga_bitstream_command.cpp b/openfpga/src/base/openfpga_bitstream_command.cpp index a59d19adf..0ebb10d58 100644 --- a/openfpga/src/base/openfpga_bitstream_command.cpp +++ b/openfpga/src/base/openfpga_bitstream_command.cpp @@ -154,6 +154,9 @@ ShellCommandId add_openfpga_write_fabric_bitstream_command(openfpga::Shell