0
我正在嘗試編寫一個過程,將給定電路中的每個強連接組件放入不同的子模塊中。如何將單元格列表放入yosys中的子模塊
所以,我試圖添加一個函數到Yosys中的SCC傳遞,以將每個SCC添加到子模塊中。功能是:
void putSelectionIntoParition (RTLIL::Design *design,
std::vector<pair<std::string,RTLIL::Selection>>& SelectionVector)
{
int p_count = 0;
for (std::vector<pair<std::string,RTLIL::Selection>>::iterator it = SelectionVector.begin();
it != SelectionVector.end(); ++it)
{
design->selection_stack[0] = it->second;
design->selection_stack[0].optimize(design);
std::string command = "submod -name ";
command.append(it->first);
Pass::call_on_selection(design, it->second, command);
++p_count;
}
}
但是,我的代碼無法正常工作。 我想問題是我用的「選擇」過程。我想知道yosys源代碼中是否有任何實用程序/ API接受單元格的矢量(以及名稱子模塊)並將它們放入子模塊中。
我想我發現了一個錯誤在那裏。我在我的主要帖子中解釋了它。請讓我知道你是否想要更多的解釋或例子。 – Mehrdad
@Mehrdad在其默認模式下,'scc'不考慮FF單元或分層單元,因此就'scc'而言,'up_counter'不包含循環。使用'-all_cell_types'來覆蓋(參見'help scc')。如果您希望找到使用'scc'跨越多個層次單元的邏輯循環,則可以展平您的設計(例如,使用'prep -flatten')。 – CliffordVienna
我用-all_cell_types做到了。它沒有工作。 – Mehrdad