From 9882394c8bb2b7a05f168de9a8b080c22e665183 Mon Sep 17 00:00:00 2001 From: chungshien-chai Date: Sun, 28 Jul 2024 02:53:18 -0700 Subject: [PATCH] Use archfpga_throw --- libs/libarchopenfpga/src/read_xml_bitstream_setting.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/libarchopenfpga/src/read_xml_bitstream_setting.cpp b/libs/libarchopenfpga/src/read_xml_bitstream_setting.cpp index 9552127d6..49b76e0b1 100644 --- a/libs/libarchopenfpga/src/read_xml_bitstream_setting.cpp +++ b/libs/libarchopenfpga/src/read_xml_bitstream_setting.cpp @@ -117,7 +117,10 @@ static void read_xml_overwrite_bitstream_setting( get_attribute(xml_bit, "path", loc_data).as_string(); const std::string& value_attr = get_attribute(xml_bit, "value", loc_data).as_string(); - VTR_ASSERT(value_attr == "0" || value_attr == "1"); + if (value_attr != "0" && value_attr != "1") { + archfpga_throw(loc_data.filename_c_str(), loc_data.line(xml_bit), + "Invalid value of overwrite_bitstream bit"); + } /* Add to bit */ bitstream_setting.add_overwrite_bitstream(path_attr, value_attr == "1"); }