XFRM

Warning

The Torii API reference is a work in progress and we are actively working on improving it, however it may be deficient or missing in places.

class torii.hdl.xfrm.DomainRenamer(domain_map: dict[str, str] | str | None = None, **kwargs: str)

Rename domains on given Elaboratable or Module.

The mapping is provided as a key-value pair to the constructor, where the key is the domain to remap and the value is the new domain.

Parameters:

**kwargs (str) – Domain translation mapping

Attention

You are not allowed to rename any domain to/from the combinatorial (comb) domain.

Example

m.submodules.timer = timer = DomainRenamer(sync = 'pci')(Timer())
Raises:

ValueError – When trying to rename a domain to/from comb to any other domain.

class torii.hdl.xfrm.EnableInserter(controls)

Inject a synchronous enable signal into the given Elaboratable.

class torii.hdl.xfrm.ResetInserter(controls)

Inject a synchronous reset signal into the given Elaboratable.