Struct calyx::ir::Cell

source · []
pub struct Cell {
    pub ports: SmallVec<[RRC<Port>; 10]>,
    pub prototype: CellType,
    pub attributes: Attributes,
    /* private fields */
}
Expand description

Represents an instantiated cell.

Fields

ports: SmallVec<[RRC<Port>; 10]>

Ports on this cell

prototype: CellType

Underlying type for this cell

attributes: Attributes

Attributes for this group.

Implementations

Construct a cell

Get a boolean describing whether the cell is external.

Get a reference to the named port if it exists.

Get a reference to the first port that has the attribute attr.

Return all ports that have the attribute attr.

Get a reference to the named port and throw an error if it doesn’t exist.

Returns true iff this cell is an instance of a Calyx-defined component.

Returns true if this is an instance of a primitive. If the optional name is provided then only returns true if the primitive has the given name.

Get a reference to the first port with the attribute attr and throw an error if none exist.

Returns the name of the component that is this cells type.

Get parameter binding from the prototype used to build this cell.

Return the canonical name for the cell generated to represent this (val, width) constant.

Return the value associated with this attribute key.

Add a new attribute to the group.

Grants immutable access to the name of this cell.

Returns a reference to all super::Port attached to this cells.

Trait Implementations

Formats the value using the given formatter. Read more

Returns an Attributes instance

Returns a mutable Attributes instance

Return a reference to the object’s name

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.

Copy the span associated with this node.