ice40: Improve the is_sb_pll40_XXX predicates collection
- Add a test for dual output PLL variant - Make them handle the packet version of the cell This will become useful for various tests during PLL rework Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
f6d6022984
commit
9483a95a4a
@ -81,7 +81,19 @@ inline bool is_sb_pll40(const BaseCtx *ctx, const CellInfo *cell)
|
|||||||
inline bool is_sb_pll40_pad(const BaseCtx *ctx, const CellInfo *cell)
|
inline bool is_sb_pll40_pad(const BaseCtx *ctx, const CellInfo *cell)
|
||||||
{
|
{
|
||||||
return cell->type == ctx->id("SB_PLL40_PAD") || cell->type == ctx->id("SB_PLL40_2_PAD") ||
|
return cell->type == ctx->id("SB_PLL40_PAD") || cell->type == ctx->id("SB_PLL40_2_PAD") ||
|
||||||
cell->type == ctx->id("SB_PLL40_2F_PAD");
|
cell->type == ctx->id("SB_PLL40_2F_PAD") ||
|
||||||
|
(cell->type == ctx->id("ICESTORM_PLL") &&
|
||||||
|
(cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_PAD" || cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2_PAD" ||
|
||||||
|
cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2F_PAD"));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool is_sb_pll40_dual(const BaseCtx *ctx, const CellInfo *cell)
|
||||||
|
{
|
||||||
|
return cell->type == ctx->id("SB_PLL40_2_PAD") || cell->type == ctx->id("SB_PLL40_2F_PAD") ||
|
||||||
|
cell->type == ctx->id("SB_PLL40_2F_CORE") ||
|
||||||
|
(cell->type == ctx->id("ICESTORM_PLL") && (cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2_PAD" ||
|
||||||
|
cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2F_PAD" ||
|
||||||
|
cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2F_CORE"));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t sb_pll40_type(const BaseCtx *ctx, const CellInfo *cell);
|
uint8_t sb_pll40_type(const BaseCtx *ctx, const CellInfo *cell);
|
||||||
|
Loading…
Reference in New Issue
Block a user