IR¶
- class torii.hdl.ir.Elaboratable(*args: Any, src_loc_at: int = 0, **kwargs: Any)¶
Todo
Document Me
- class torii.hdl.ir.Fragment None ¶
Todo
Document Me
- static get(obj: Fragment | Elaboratable, platform: Platform | None, *, formal: bool = False) Fragment ¶
- Return type:
Todo
Document Me
- add_ports(*ports, dir)¶
Todo
Document Me
- iter_ports(dir=None)¶
Todo
Document Me
- add_driver(signal: Signal | ClockSignal | ResetSignal | None, domain: str | None = None)¶
Todo
Document Me
- iter_drivers()¶
Todo
Document Me
- iter_comb()¶
Todo
Document Me
- iter_sync()¶
Todo
Document Me
- iter_signals()¶
Todo
Document Me
- add_domains(*domains)¶
Todo
Document Me
- iter_domains()¶
Todo
Document Me
- add_statements(*stmts)¶
Todo
Document Me
- find_subfragment(name_or_index)¶
Todo
Document Me
- find_generated(*path)¶
Todo
Document Me
- elaborate(platform)¶
Todo
Document Me
- prepare(ports=None, missing_domain=<function Fragment.<lambda>>)¶
Todo
Document Me
- class torii.hdl.ir.Instance(type: str, *args: InstanceArgsT, src_loc: SrcLoc | None = None, src_loc_at: int = 0, **kwargs: ValueCastT | str) None ¶
Allows for the direct instantiation of external modules, cells, or primitives.
It accepts the name of the object to instantiate and a collection of keyword arguments that define the ports, attributes, and parameters to it.
It is defined by a prefix followed by the canonical name of the element the value is setting. For instance, if you have a cell called
dff
with ports namedCLK
,D
, andQ
you are able to instantiate it as follows:dff = Instance( 'dff', i_D = sig_in, i_CLK = clk, o_Q = sig_out, )
The meaning of the prefix for the arguments are as follows:
Prefix
Corresponding Type
a_
Attribute
p_
Parameter
i_
Input Port/Signal
o_
Output Port/Signal
io_
Bi-directional Port/Signal
- Parameters:
type (str) – The name/type of object to instantiate