luna_soc.gateware.core.spiflash.utils module

class luna_soc.gateware.core.spiflash.utils.RoundRobin(*args, src_loc_at=0, **kwargs)[source]

Bases: Elaboratable

Round-robin scheduler.

For a given set of requests, the round-robin scheduler will grant one request. Once it grants a request, if any other requests are active, it grants the next active request with a greater number, restarting from zero once it reaches the highest one.

Use EnableInserter to control when the scheduler is updated.

Parameters

countint

Number of requests.

Attributes

requestsSignal(count), in

Set of requests.

grantSignal(range(count)), out

Number of the granted request. Does not change if there are no active requests.

validSignal(), out

Asserted if grant corresponds to an active request. Deasserted otherwise, i.e. if no requests are active.

elaborate(platform)[source]
class luna_soc.gateware.core.spiflash.utils.WaitTimer(*args, src_loc_at=0, **kwargs)[source]

Bases: Elaboratable

elaborate(platform)[source]