From 3d062872def7e3a744f0bf0d1a257b6c2154111d Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 5 Oct 2021 14:08:01 -0700 Subject: [PATCH] [Lib] Upgrade openfpga arch parser to error out for unsupported configuration protocol settings --- .../libarchopenfpga/src/read_xml_config_protocol.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp b/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp index 9a3a60336..0472b7d73 100644 --- a/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp +++ b/libopenfpga/libarchopenfpga/src/read_xml_config_protocol.cpp @@ -152,6 +152,12 @@ void read_xml_config_organization(pugi::xml_node& xml_config_orgz, if (xml_wl_protocol) { read_xml_wl_protocol(xml_wl_protocol, loc_data, config_protocol); } + + /* Throw an execption if the BL/WL protocols are different. We currently do not support it! */ + if (config_protocol.bl_protocol_type() != config_protocol.wl_protocol_type()) { + archfpga_throw(loc_data.filename_c_str(), loc_data.line(xml_config_orgz), + "Expect same type of protocol for both BL and WL! Other combinations are not supported yet\n"); + } } }