ice40: Trim DSP inputs that are constant where appropriate
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
bff7d673ed
commit
79dc910b40
@ -52,7 +52,11 @@ typedef IdString PipId;
|
||||
typedef IdString GroupId;
|
||||
typedef IdString DecalId;
|
||||
|
||||
struct ArchNetInfo { };
|
||||
struct ArchCellInfo { };
|
||||
struct ArchNetInfo
|
||||
{
|
||||
};
|
||||
struct ArchCellInfo
|
||||
{
|
||||
};
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
@ -307,6 +307,10 @@ static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constne
|
||||
if ((is_lut(ctx, uc) || is_lc(ctx, uc) || is_carry(ctx, uc)) && (user.port.str(ctx).at(0) == 'I') &&
|
||||
!constval) {
|
||||
uc->ports[user.port].net = nullptr;
|
||||
} else if ((is_sb_mac16(ctx, uc) || uc->type == ctx->id("ICESTORM_DSP")) &&
|
||||
(user.port != ctx->id("CLK") &&
|
||||
((constval && user.port == ctx->id("CE")) || (!constval && user.port != ctx->id("CE"))))) {
|
||||
uc->ports[user.port].net = nullptr;
|
||||
} else {
|
||||
uc->ports[user.port].net = constnet;
|
||||
constnet->users.push_back(user);
|
||||
|
Loading…
Reference in New Issue
Block a user