From 4926c323e72ec2713847e50eef3305b082a6e27d Mon Sep 17 00:00:00 2001 From: tangxifan Date: Wed, 29 Sep 2021 16:32:29 -0700 Subject: [PATCH] [Engine] Bug fix due to the optional syntax ``num_bank`` were required in XML --- libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp b/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp index c84bbe93b..9a3a60336 100644 --- a/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp +++ b/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp @@ -74,7 +74,7 @@ void read_xml_bl_protocol(pugi::xml_node& xml_bl_protocol, */ if (BLWL_PROTOCOL_SHIFT_REGISTER == blwl_protocol_type) { config_protocol.set_bl_memory_model_name(get_attribute(xml_bl_protocol, "circuit_model_name", loc_data).as_string()); - config_protocol.set_bl_num_banks(get_attribute(xml_bl_protocol, "num_banks", loc_data).as_int(1)); + config_protocol.set_bl_num_banks(get_attribute(xml_bl_protocol, "num_banks", loc_data, pugiutil::ReqOpt::OPTIONAL).as_int(1)); } } @@ -104,7 +104,7 @@ void read_xml_wl_protocol(pugi::xml_node& xml_wl_protocol, */ if (BLWL_PROTOCOL_SHIFT_REGISTER == blwl_protocol_type) { config_protocol.set_wl_memory_model_name(get_attribute(xml_wl_protocol, "circuit_model_name", loc_data).as_string()); - config_protocol.set_wl_num_banks(get_attribute(xml_wl_protocol, "num_banks", loc_data).as_int(1)); + config_protocol.set_wl_num_banks(get_attribute(xml_wl_protocol, "num_banks", loc_data, pugiutil::ReqOpt::OPTIONAL).as_int(1)); } }