diff --git a/himbaechel/uarch/gowin/gowin.h b/himbaechel/uarch/gowin/gowin.h index 174feb53..001c1cfb 100644 --- a/himbaechel/uarch/gowin/gowin.h +++ b/himbaechel/uarch/gowin/gowin.h @@ -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 { diff --git a/himbaechel/uarch/gowin/gowin_arch_gen.py b/himbaechel/uarch/gowin/gowin_arch_gen.py index 6a71ad8b..473efa21 100644 --- a/himbaechel/uarch/gowin/gowin_arch_gen.py +++ b/himbaechel/uarch/gowin/gowin_arch_gen.py @@ -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))