pub struct Rewriter {
    pub port_map: PortRewriteMap,
    pub cell_map: RewriteMap<Cell>,
    pub group_map: RewriteMap<Group>,
    pub comb_group_map: RewriteMap<CombGroup>,
    pub static_group_map: RewriteMap<StaticGroup>,
}
Expand description

A structure to track rewrite maps for ports. Stores both cell rewrites and direct port rewrites. Attempts to apply port rewrites first before trying the cell rewrite.

Fields

port_map: PortRewriteMap

Mapping from canonical names of ports to port instances

cell_map: RewriteMap<Cell>

Mapping from names of cells to cell instance.

group_map: RewriteMap<Group>

Mapping from names of groups to group instance.

comb_group_map: RewriteMap<CombGroup>

Mapping from names of combinational groups to combinational group instance.

static_group_map: RewriteMap<StaticGroup>

Mapping from names of static groups to static group instance.

Implementations

Return the rewrite for a cell

Get any port rewrite defined for the given port.

Rewrite assignments in a guard

Rewrite an assignment

Rewrite a invoke node using a RewriteMapir::Cell and a RewriteMapir::CombGroup

Rewrite a static invoke node using a RewriteMapir::Cell and a RewriteMapir::CombGroup

Given a control program, rewrite all uses of cells, groups, and comb groups using the given rewrite maps.

Given a control program, rewrite all uses of cells, groups, and comb groups using the given rewrite maps.

Rewrite the component using the given maps

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.