Use archfpga_throw

This commit is contained in:
chungshien-chai 2024-07-28 02:53:18 -07:00
parent ae5b9a3f72
commit 9882394c8b
1 changed files with 4 additions and 1 deletions

View File

@ -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");
}