diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 584725288..d4994fdbe 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -75,10 +75,17 @@ namespace RTLIL struct Binding; #ifdef _YOSYS_VAY_ - struct CoarseCell; // same as Cell in a NOVAY build - struct FineCell; // only single-bit ports and no parameters - struct AYFineCell; // cell with single-bit ports "A" and "Y" and no parameters - struct ABYFineCell; // cell with single-bit ports "A", "B", and "Y" and no parameters + struct CoarseDynamicCelll; // same as Cell in a NOVAY build + struct FineDynamicCell; // only single-bit ports and no parameters + + // maybe instead: + // #define X(classname) struct classname; + // #include "kernel/dyncells.xh" + // #uindef X + struct CoarseStaticCell_AwYw; // cell with multi-bit "A" and "B" ports "A_WIDTH" and "Y_WIDTH" parameters + struct CoarseStaticCell_wABSY; // cell with multi-bit "A", "B", and "S" ports and "WIDTH" parameters + struct FineStaticCell_AY; // cell with single-bit ports "A" and "Y" and no parameters + struct FineStaticCell_ABY; // cell with single-bit ports "A", "B", and "Y" and no parameters // ... #endif @@ -1600,7 +1607,7 @@ public: std::vector>> *allocsPtr = nullptr) const = 0; }; -struct RTLIL::CoarseCell final : public RTLIL::Cell +struct RTLIL::CoarseDynamicCelll final : public RTLIL::Cell { #endif unsigned int hashidx_; @@ -1651,8 +1658,9 @@ struct RTLIL::CoarseCell final : public RTLIL::Cell std::vector>> *allocsPtr = nullptr) const; }; +// maybe this will be #include "kernel/dyncells.h", generated by "kernel/dyncells.py" #ifdef _YOSYS_VAY_ -struct RTLIL::FineCell final : public RTLIL::Cell +struct RTLIL::FineDynamicCell final : public RTLIL::Cell { dict connections_; @@ -1663,7 +1671,7 @@ struct RTLIL::FineCell final : public RTLIL::Cell std::vector>> *allocsPtr = nullptr) const; }; -struct RTLIL::AYFineCell final : public RTLIL::Cell +struct RTLIL::FineStaticCell_AY final : public RTLIL::Cell { SigBit portA_, portY_; @@ -1682,7 +1690,7 @@ struct RTLIL::AYFineCell final : public RTLIL::Cell std::vector>> *allocsPtr = nullptr) const; }; -struct RTLIL::ABYFineCell final : public RTLIL::Cell +struct RTLIL::FineStaticCell_ABY final : public RTLIL::Cell { SigBit portA_, portB_, portY_; @@ -1703,6 +1711,17 @@ struct RTLIL::ABYFineCell final : public RTLIL::Cell }; //... +#else // _YOSYS_VAY_ + +struct RTLIL::CoarseDynamicCell final : public RTLIL::Cell {}; +struct RTLIL::FineDynamicCell final : public RTLIL::Cell {}; + +struct RTLIL::CoarseStaticCell_AwYw final : public RTLIL::Cell {}; +struct RTLIL::CoarseStaticCell_wABSY final : public RTLIL::Cell {}; + +struct RTLIL::FineStaticCell_AY final : public RTLIL::Cell {}; +struct RTLIL::FineStaticCell_ABY final : public RTLIL::Cell {}; + #endif struct RTLIL::CaseRule : public RTLIL::AttrObject