aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/arch.h
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-01-09 19:02:01 +0000
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:27 +0000
commiteb15463406c5784f7c3599163ba40571188d57c7 (patch)
tree89a23932dfbac1abb06e77c00fd6dce3e7fa7a82 /nexus/arch.h
parent8e53b35fcc9aad873225b90405d0d509cbb6e869 (diff)
downloadnextpnr-eb15463406c5784f7c3599163ba40571188d57c7.tar.gz
nextpnr-eb15463406c5784f7c3599163ba40571188d57c7.tar.bz2
nextpnr-eb15463406c5784f7c3599163ba40571188d57c7.zip
nexus: Add routing FASM export
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/arch.h')
-rw-r--r--nexus/arch.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/nexus/arch.h b/nexus/arch.h
index 2f6c5f7e..f46f51c7 100644
--- a/nexus/arch.h
+++ b/nexus/arch.h
@@ -100,8 +100,15 @@ NPNR_PACKED_STRUCT(struct LocWireInfoPOD {
RelPtr<BelPinPOD> bel_pins;
});
+enum PipFlags
+{
+ PIP_FIXED_CONN = 0x8000,
+};
+
NPNR_PACKED_STRUCT(struct PipInfoPOD {
uint16_t from_wire, to_wire;
+ uint16_t flags;
+ uint16_t padding;
int32_t tile_type;
});
@@ -1115,7 +1122,16 @@ struct Arch : BaseCtx
{
return chip_canonical_wire(db, chip_info, tile, index);
}
-
+ IdString pip_src_wire_name(PipId pip) const
+ {
+ int wire = pip_data(pip).from_wire;
+ return db->loctypes[chip_info->grid[pip.tile].loc_type].wires[wire].name;
+ }
+ IdString pip_dst_wire_name(PipId pip) const
+ {
+ int wire = pip_data(pip).to_wire;
+ return db->loctypes[chip_info->grid[pip.tile].loc_type].wires[wire].name;
+ }
// -------------------------------------------------
NeighWireRange neigh_wire_range(WireId wire) const
@@ -1136,6 +1152,9 @@ struct Arch : BaseCtx
// -------------------------------------------------
bool nexus_logic_tile_valid(LogicTileStatus &lts) const;
+
+ // -------------------------------------------------
+ void write_fasm(std::ostream &out) const;
};
NEXTPNR_NAMESPACE_END