Skip to content
Snippets Groups Projects

Implement functions via MUXes

Merged Мирошниченко Лев Игоревич requested to merge functions-on-mux into main

Merge request reports

Merge request pipeline #78443 passed

Merge request pipeline passed for 545014da

Test coverage 82.40% (-0.40%) from 1 job

Merged by Черток Никита ДмитриевичЧерток Никита Дмитриевич 2 weeks ago (Apr 7, 2025 8:48pm UTC)

Loading

Pipeline #78446 passed

Pipeline passed for f7ec7b14 on main

Test coverage 82.40% (-0.40%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 335 342 return eqClasses;
    336 343 }
    337 344
    338 void PrepareContext::completePclasses() {
    345 std::vector<CellLogPair> PrepareContext::searchMux2x1() const {
    346 /*
    347 * Function searching multiplexer with specified dataWidth and selectorSize,
    348 * currently only 2x1 multiplexer supported.
    349 */
    350 const auto& library = context_.techMapContext.library;
    351 model::TruthTable mux = kitty::create<kitty::dynamic_truth_table>(3);
  • 349 */
    350 const auto& library = context_.techMapContext.library;
    351 model::TruthTable mux = kitty::create<kitty::dynamic_truth_table>(3);
    352 kitty::create_from_hex_string(mux, "D8");
    353 const model::TruthTable mux_canonized = matcher::getPCanon(mux).truthTable;
    354
    355 std::vector<CellLogPair> res;
    356
    357 for (const CombCell& cell : library->getCombCells()) {
    358 for (size_t outputIndex = 0, size = cell.ctt.size(); outputIndex < size; ++outputIndex) {
    359 if (cell.ctt[outputIndex] == mux_canonized)
    360 res.emplace_back(&cell, outputIndex);
    361 }
    362 }
    363
    364 return res;
  • 625 pin.timingArcs.resize(numInputs);
    626 }
    627
    628 pComplCells_.push_back(std::move(newSuperCell));
    629 return {&pComplCells_.back(), 0};
    630 }
    631
    632 void PrepareContext::completePClassesMux() { // TODO: uncompleted function
    633 const auto &library = *context_.techMapContext.library;
    634 const std::vector<CombCell> &existingCells = library.getCombCells();
    635
    636 CttMap existingCellsP1;
    637 CttMap existingCellsP2; // TODO: rework for certain P classes
    638 CttMap existingCellsP3;
    639
    640 for (const auto &cell : existingCells) {
    • Еще думаю надо в отдельном файле создать класс генератора на мультиплексорах(MuxCellGenerator например), отнаследованный от базового генератора BaseCellGenerator, и всю его логику перенести туда. В library_prepare остается только completPClassesMux completP2ClassesMux completP3ClassesMux

    • Развивая идею, лучше будет создать абстрактный класс, задающий интерфейс генератора ячеек, и несколько реализаций этого интерфейса, остальной код должен работать с интерфейсом

      На мой взгляд, подготовитель библиотеки/контекста выполняет работу нескольких сущностей одновременно, попахивает godobject'ом, хорошо бы это декомпозировать

    • Please register or sign in to reply
  • added 2 commits

    • bb8db9bc - Refarctor function on mux constructor
    • 315b26ea - Temporary pinout fix for generated cell unti cellcharacterisation function is implemented

    Compare with previous version

  • added 1 commit

    • 5f7e67d8 - Fix errors with const method and double declaration

    Compare with previous version

  • added 97 commits

    Compare with previous version

  • added 1 commit

    • 8bdbc894 - Fix code to work with new interfaces

    Compare with previous version

  • added 20 commits

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply