WIP support for setting the iostd

This commit is contained in:
Pepijn de Vos 2024-10-02 15:32:05 +02:00
parent bcab74cc14
commit 6d9095ead8
2 changed files with 3 additions and 1 deletions

View File

@ -135,6 +135,7 @@ NPNR_PACKED_STRUCT(struct Constraint_POD {
int32_t row;
int32_t col;
int32_t bel;
int32_t iostd;
});
NPNR_PACKED_STRUCT(struct Extra_package_data_POD {

View File

@ -251,11 +251,12 @@ class PackageExtraData(BBAStruct):
def serialise_lists(self, context: str, bba: BBAWriter):
bba.label(f"{context}_constraints")
for (net, row, col, bel) in self.cst:
for (net, row, col, bel, iostd) in self.cst:
bba.u32(self.strs.id(net).index)
bba.u32(row)
bba.u32(col)
bba.u32(ord(bel[0])-ord('A')+IOBA_Z)
bba.u32(self.strs.id(iostd).index if iostd else 0)
def serialise(self, context: str, bba: BBAWriter):
bba.slice(f"{context}_constraints", len(self.cst))