-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Looking at:
clash-protocols/clash-protocols/src/Protocols/Df.hs
Lines 857 to 870 in ec001d4
| roundrobinCollect Parallel = | |
| Circuit (B.first C.unbundle . C.unbundle . fmap go . C.bundle . B.first C.bundle) | |
| where | |
| go (dats0, ack) = (acks, dat1) | |
| where | |
| nacks = C.repeat (Ack False) | |
| acks = Maybe.fromMaybe nacks ((\i -> C.replace i ack nacks) <$> iM) | |
| dat1 = Maybe.fromMaybe NoData dat0 | |
| (iM, dat0) = Data.List.NonEmpty.unzip dats1 | |
| dats1 = C.fold @(n C.- 1) (<|>) (C.zipWith goDat C.indicesI dats0) | |
| goDat i dat | |
| | Maybe.isJust (dataToMaybe dat) = Just (i, dat) | |
| | otherwise = Nothing |
it doesn't actually have the roundrobin properties that I would expect from an roundrobin arbiter: that regardless of the conditions, all inputs will get a chance to propagate. Instead, it's a priority arbiter which, from left-to-right, gives right the highest priority. I think the functions should be renamed to arbiter and highlight how the different scheduling "collect" strategies affect the arbitration.
Metadata
Metadata
Assignees
Labels
No labels