Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
Signed-off-by: Claire Xenia Wolf <[email protected]>
  • Loading branch information
clairexen committed Jul 22, 2024
1 parent 5a53212 commit c35dd4a
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions kernel/rtlil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -1600,7 +1607,7 @@ struct RTLIL::Cell : public RTLIL::AttrObject
std::vector<std::pair<int,std::vector<RTLIL::IdString>>> *allocsPtr = nullptr) const = 0;
};

struct RTLIL::CoarseCell final : public RTLIL::Cell
struct RTLIL::CoarseDynamicCelll final : public RTLIL::Cell
{
#endif
unsigned int hashidx_;
Expand Down Expand Up @@ -1651,8 +1658,9 @@ struct RTLIL::CoarseCell final : public RTLIL::Cell
std::vector<std::pair<int,std::vector<RTLIL::IdString>>> *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<RTLIL::IdString, RTLIL::SigBit> connections_;

Expand All @@ -1663,7 +1671,7 @@ struct RTLIL::FineCell final : public RTLIL::Cell
std::vector<std::pair<int,std::vector<RTLIL::IdString>>> *allocsPtr = nullptr) const;
};

struct RTLIL::AYFineCell final : public RTLIL::Cell
struct RTLIL::FineStaticCell_AY final : public RTLIL::Cell
{
SigBit portA_, portY_;

Expand All @@ -1682,7 +1690,7 @@ struct RTLIL::AYFineCell final : public RTLIL::Cell
std::vector<std::pair<int,std::vector<RTLIL::IdString>>> *allocsPtr = nullptr) const;
};

struct RTLIL::ABYFineCell final : public RTLIL::Cell
struct RTLIL::FineStaticCell_ABY final : public RTLIL::Cell
{
SigBit portA_, portB_, portY_;

Expand All @@ -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
Expand Down

0 comments on commit c35dd4a

Please sign in to comment.