pub struct Externalize;
Expand description

Externalize input/output ports for cells marked with the @external(1) attribute. The ports of these cells are exposed through the ports of the parent component.

For example:

component main() -> () {
    cells {
        // Inputs: addr0, write_data, write_en
        // Outputs: read_data, done
        @external(1) m1 = prim std_mem_d1(32, 10, 4);
    }
    wires {
        m1.addr0 = 1'd1;
        x.in = m1.read_data;
    }
}

is transformed into:

component main(
    m1_read_data: 32,
    m1_done: 1
) -> (m1_add0: 4, m1_write_data: 32, m1_write_en: 1) {
    cells {
        // m1 removed.
    }
    wires {
        m1_add0 = 1'd1;
        x.in = m1_read_data;
    }
}

Trait Implementations

Construct the visitor using information from the Context

Clear the data stored in the visitor. Called before traversing the next component by ir::traversal::Visitor. Read more

The name of a pass. Is used for identifying passes.

A short description of the pass.

Executed before the traversal begins.

Returns true if this pass requires a post-order traversal of the components. In a post-order traversal, if component B uses a component A, then A is guaranteed to be traversed before B. Read more

Define the traversal over a component. Calls Visitor::start, visits each control node, and finally calls Visitor::finish. Read more

Run the visitor on a given program ir::Context. The function mutably borrows the control program in each component and traverses it. Read more

Build a Default implementation of this pass and call Visitor::do_pass using it. Read more

Executed after the traversal ends. This method is always invoked regardless of the Action returned from the children. Read more

Executed before visiting the children of a ir::Seq node.

Executed after visiting the children of a ir::Seq node.

Executed before visiting the children of a ir::Par node.

Executed after visiting the children of a ir::Par node.

Executed before visiting the children of a ir::If node.

Executed after visiting the children of a ir::If node.

Executed before visiting the children of a ir::While node.

Executed after visiting the children of a ir::While node.

Executed at an ir::Enable node.

Executed at an ir::Invoke node.

Executed at an ir::Empty node.

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.