From 30e2f0e1e8cfdb24abe6c3a8013691497c706975 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 21 Jul 2018 21:40:06 +0200 Subject: Add Loc constructors Signed-off-by: Clifford Wolf --- generic/arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index e1516569..f4ca4383 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -97,7 +97,7 @@ struct Arch : BaseCtx void addPip(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay); void addAlias(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay); - void addBel(IdString name, IdString type, int x, int y, int z, bool gb); + void addBel(IdString name, IdString type, Loc loc, bool gb); void addBelInput(IdString bel, IdString name, IdString wire); void addBelOutput(IdString bel, IdString name, IdString wire); void addBelInout(IdString bel, IdString name, IdString wire); -- cgit v1.2.3 From 62b66e02085371c456dee95dc08d2cd41351c91f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 22 Jul 2018 10:59:21 +0200 Subject: Rename getWireBelPin to getBelPinWire Signed-off-by: Clifford Wolf --- generic/arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index f4ca4383..7bcb965f 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -145,7 +145,7 @@ struct Arch : BaseCtx const std::vector &getBels() const; const std::vector &getBelsByType(BelType type) const; BelType getBelType(BelId bel) const; - WireId getWireBelPin(BelId bel, PortPin pin) const; + WireId getBelPinWire(BelId bel, PortPin pin) const; BelPin getBelPinUphill(WireId wire) const; const std::vector &getBelPinsDownhill(WireId wire) const; -- cgit v1.2.3 From bfa83b3bfd8020298b672d467dbd6c1c6c067c21 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 22 Jul 2018 11:12:28 +0200 Subject: Add Arch::getBelPinType() and Arch::getWireBelPins() in generic arch Signed-off-by: Clifford Wolf --- generic/arch.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index 7bcb965f..2a74b1ae 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -43,6 +43,7 @@ struct WireInfo std::vector downhill, uphill, aliases; BelPin uphill_bel_pin; std::vector downhill_bel_pins; + std::vector bel_pins; DecalXY decalxy; int x, y; }; @@ -146,8 +147,9 @@ struct Arch : BaseCtx const std::vector &getBelsByType(BelType type) const; BelType getBelType(BelId bel) const; WireId getBelPinWire(BelId bel, PortPin pin) const; - BelPin getBelPinUphill(WireId wire) const; - const std::vector &getBelPinsDownhill(WireId wire) const; + PortType getBelPinType(BelId bel, PortPin pin) const; + BelPin getBelPinUphill(WireId wire) const NPNR_DEPRECATED; + const std::vector &getBelPinsDownhill(WireId wire) const NPNR_DEPRECATED; WireId getWireByName(IdString name) const; IdString getWireName(WireId wire) const; @@ -159,6 +161,7 @@ struct Arch : BaseCtx IdString getConflictingWireNet(WireId wire) const; DelayInfo getWireDelay(WireId wire) const { return DelayInfo(); } const std::vector &getWires() const; + const std::vector &getWireBelPins(WireId wire) const; PipId getPipByName(IdString name) const; IdString getPipName(PipId pip) const; -- cgit v1.2.3 From e13fc7edabb449d21ad6473bab23d5c1b2cf3761 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 22 Jul 2018 12:08:52 +0200 Subject: Add Arch::getBelPins() to generic and iCE40 archs Signed-off-by: Clifford Wolf --- generic/arch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index 2a74b1ae..e650906d 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -150,6 +150,7 @@ struct Arch : BaseCtx PortType getBelPinType(BelId bel, PortPin pin) const; BelPin getBelPinUphill(WireId wire) const NPNR_DEPRECATED; const std::vector &getBelPinsDownhill(WireId wire) const NPNR_DEPRECATED; + std::vector getBelPins(BelId bel) const; WireId getWireByName(IdString name) const; IdString getWireName(WireId wire) const; -- cgit v1.2.3 From b9c413a5aa06a325de5c55e254441aee58143676 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 22 Jul 2018 19:58:17 +0200 Subject: Move to new API and remove deprecated --- generic/arch.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index e650906d..a77dca68 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -148,8 +148,6 @@ struct Arch : BaseCtx BelType getBelType(BelId bel) const; WireId getBelPinWire(BelId bel, PortPin pin) const; PortType getBelPinType(BelId bel, PortPin pin) const; - BelPin getBelPinUphill(WireId wire) const NPNR_DEPRECATED; - const std::vector &getBelPinsDownhill(WireId wire) const NPNR_DEPRECATED; std::vector getBelPins(BelId bel) const; WireId getWireByName(IdString name) const; -- cgit v1.2.3 From 27c523682601e7b504c924a00bec98743fd3477c Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 23 Jul 2018 12:19:54 +0200 Subject: Add getGridDimX(), getGridDimY(), getTileDimZ() API Signed-off-by: Clifford Wolf --- generic/arch.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index a77dca68..5f0df988 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -87,11 +87,14 @@ struct Arch : BaseCtx std::unordered_map> bel_ids_by_type; std::unordered_map bel_by_loc; - std::unordered_map>> bels_by_tile; + std::vector>> bels_by_tile; std::unordered_map> decal_graphics; DecalXY frame_decalxy; + int gridDimX, gridDimY; + std::vector> tileDimZ; + float grid_distance_to_delay; void addWire(IdString name, int x, int y); @@ -131,6 +134,10 @@ struct Arch : BaseCtx BelType belTypeFromId(IdString id) const { return id; } PortPin portPinFromId(IdString id) const { return id; } + int getGridDimX() const { return gridDimX; } + int getGridDimY() const { return gridDimY; } + int getTileDimZ(int x, int y) const { return tileDimZ[x][y]; } + BelId getBelByName(IdString name) const; IdString getBelName(BelId bel) const; Loc getBelLocation(BelId bel) const; -- cgit v1.2.3 From 90fe002a36a9b90cd6d003d34398242a5d5affb6 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 23 Jul 2018 13:16:27 +0200 Subject: Remove getBelsByType() API Signed-off-by: Clifford Wolf --- generic/arch.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index 5f0df988..61e6b033 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -84,7 +84,6 @@ struct Arch : BaseCtx std::unordered_map groups; std::vector bel_ids, wire_ids, pip_ids; - std::unordered_map> bel_ids_by_type; std::unordered_map bel_by_loc; std::vector>> bels_by_tile; @@ -151,7 +150,6 @@ struct Arch : BaseCtx IdString getBoundBelCell(BelId bel) const; IdString getConflictingBelCell(BelId bel) const; const std::vector &getBels() const; - const std::vector &getBelsByType(BelType type) const; BelType getBelType(BelId bel) const; WireId getBelPinWire(BelId bel, PortPin pin) const; PortType getBelPinType(BelId bel, PortPin pin) const; -- cgit v1.2.3