ecp5: EXTREFB fixes

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2018-11-09 18:18:50 +00:00
parent bc022173f0
commit 0eba7d9789
2 changed files with 5 additions and 1 deletions

View File

@ -379,6 +379,8 @@ class Ecp5GlobalRouter
for (auto user : net->users) {
if (user.port == id_CLKFB) {
keep_users.push_back(user);
} else if (net->driver.cell->type == id_EXTREFB && user.cell->type == id_DCCA) {
keep_users.push_back(user);
} else {
glbnet->users.push_back(user);
user.cell->ports.at(user.port).net = glbnet.get();

View File

@ -1118,7 +1118,9 @@ class Ecp5Packer
if (refo == nullptr)
log_error("EXTREFB REFCLKO must not be unconnected\n");
for (auto user : refo->users) {
if (user.cell->type != id_DCUA || (dcu != nullptr && dcu != user.cell))
if (user.cell->type != id_DCUA)
continue;
if (dcu != nullptr && dcu != user.cell)
log_error("EXTREFB REFCLKO must only drive a single DCUA\n");
dcu = user.cell;
}