From cde26597edb00b48fc16cd0d2c5d7bc1afb1f9ee Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 4 Jan 2021 18:45:47 -0700 Subject: [PATCH] [Tool] Bug fix in scan chain builder calling --- openfpga/src/fabric/build_memory_modules.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openfpga/src/fabric/build_memory_modules.cpp b/openfpga/src/fabric/build_memory_modules.cpp index 447b49107..970ef8a95 100644 --- a/openfpga/src/fabric/build_memory_modules.cpp +++ b/openfpga/src/fabric/build_memory_modules.cpp @@ -553,8 +553,10 @@ void build_memory_chain_module(ModuleManager& module_manager, /* If there is a second input defined, * add nets to short wire the 2nd inputs to the first inputs */ - add_module_nets_to_cmos_memory_scan_chain_module(module_manager, mem_module, - circuit_lib, sram_input_ports[1], sram_output_ports[0]); + if (2 == sram_input_ports.size()) { + add_module_nets_to_cmos_memory_scan_chain_module(module_manager, mem_module, + circuit_lib, sram_input_ports[1], sram_output_ports[0]); + } /* Add global ports to the pb_module: * This is a much easier job after adding sub modules (instances),