[core] fixed a bug which cause configuration protocols other than ccff failed

This commit is contained in:
tangxifan 2023-04-24 22:46:46 +08:00
parent 39708e6226
commit e20ac5f272
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,9 @@ CircuitModelId ConfigProtocol::memory_model() const { return memory_model_; }
int ConfigProtocol::num_regions() const { return num_regions_; }
size_t ConfigProtocol::num_prog_clocks() const {
VTR_ASSERT(type_ == CONFIG_MEM_SCAN_CHAIN);
if (type_ != CONFIG_MEM_SCAN_CHAIN) {
return 1;
}
if (prog_clk_port_.is_valid()) {
return prog_clk_port_.get_width();
}