Skip to content

Commit

Permalink
Gowin. Registers in IO.
Browse files Browse the repository at this point in the history
Change the logic for handling command line keys and attributes -
attributes allow routines to be placed in IO regardless of global mode.

Signed-off-by: YRabbit <[email protected]>
  • Loading branch information
yrabbit committed Dec 31, 2024
1 parent 74e7f87 commit 1c28394
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions himbaechel/uarch/gowin/pack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ struct GowinPacker

// input reg in IO
CellInfo *iologic_i = nullptr;
if ((ci.type == id_IBUF && ctx->settings.count(id_IREG_IN_IOB)) ||
(ci.type == id_IOBUF && ctx->settings.count(id_IOREG_IN_IOB))) {
if ((ci.type == id_IBUF && (ctx->settings.count(id_IREG_IN_IOB) || ci.attrs.count(id_IOBFF))) ||
(ci.type == id_IOBUF && (ctx->settings.count(id_IOREG_IN_IOB) || ci.attrs.count(id_IOBFF)))) {

if (ci.getPort(id_O) == nullptr) {
continue;
Expand Down Expand Up @@ -761,8 +761,8 @@ struct GowinPacker

// output reg in IO
CellInfo *iologic_o = nullptr;
if ((ci.type == id_OBUF && ctx->settings.count(id_OREG_IN_IOB)) ||
(ci.type == id_IOBUF && ctx->settings.count(id_IOREG_IN_IOB))) {
if ((ci.type == id_OBUF && (ctx->settings.count(id_OREG_IN_IOB) || ci.attrs.count(id_IOBFF))) ||
(ci.type == id_IOBUF && (ctx->settings.count(id_IOREG_IN_IOB) || ci.attrs.count(id_IOBFF)))) {
while (1) {
if (ci.getPort(id_I) == nullptr) {
break;
Expand Down Expand Up @@ -862,7 +862,7 @@ struct GowinPacker
}

// output enable reg in IO
if (ci.type == id_IOBUF && ctx->settings.count(id_IOREG_IN_IOB)) {
if (ci.type == id_IOBUF && (ctx->settings.count(id_IOREG_IN_IOB) || ci.attrs.count(id_IOBFF))) {
while (1) {
if (ci.getPort(id_OEN) == nullptr) {
break;
Expand Down

0 comments on commit 1c28394

Please sign in to comment.