pub trait HasSpiceLikeNetlist: Schema {
    // Required methods
    fn write_include<W: Write>(
        &self,
        out: &mut W,
        include: &Include
    ) -> Result<()>;
    fn write_start_subckt<W: Write>(
        &self,
        out: &mut W,
        name: &ArcStr,
        ports: &[&SignalInfo]
    ) -> Result<()>;
    fn write_end_subckt<W: Write>(
        &self,
        out: &mut W,
        name: &ArcStr
    ) -> Result<()>;
    fn write_instance<W: Write>(
        &self,
        out: &mut W,
        name: &ArcStr,
        connections: Vec<ArcStr>,
        child: &ArcStr
    ) -> Result<ArcStr>;
    fn write_primitive_inst<W: Write>(
        &self,
        out: &mut W,
        name: &ArcStr,
        connections: HashMap<ArcStr, Vec<ArcStr>>,
        primitive: &<Self as Schema>::Primitive
    ) -> Result<ArcStr>;

    // Provided methods
    fn write_prelude<W: Write>(
        &self,
        out: &mut W,
        lib: &Library<Self>
    ) -> Result<()> { ... }
    fn write_slice<W: Write>(
        &self,
        out: &mut W,
        slice: Slice,
        info: &SignalInfo
    ) -> Result<()> { ... }
    fn write_postlude<W: Write>(
        &self,
        out: &mut W,
        lib: &Library<Self>
    ) -> Result<()> { ... }
}
Expand description

A schema with a SPICE-like netlist format.

Required Methods§

source

fn write_include<W: Write>(&self, out: &mut W, include: &Include) -> Result<()>

Writes an include statement.

A newline will be added afterward.

source

fn write_start_subckt<W: Write>( &self, out: &mut W, name: &ArcStr, ports: &[&SignalInfo] ) -> Result<()>

Writes a begin subcircuit statement.

A newline will be added afterward.

source

fn write_end_subckt<W: Write>(&self, out: &mut W, name: &ArcStr) -> Result<()>

Writes an end subcircuit statement.

A newline will be added afterward.

source

fn write_instance<W: Write>( &self, out: &mut W, name: &ArcStr, connections: Vec<ArcStr>, child: &ArcStr ) -> Result<ArcStr>

Writes a SCIR instance.

A newline will be added afterward.

source

fn write_primitive_inst<W: Write>( &self, out: &mut W, name: &ArcStr, connections: HashMap<ArcStr, Vec<ArcStr>>, primitive: &<Self as Schema>::Primitive ) -> Result<ArcStr>

Writes a primitive instantiation.

A newline will be added afterward.

Provided Methods§

source

fn write_prelude<W: Write>( &self, out: &mut W, lib: &Library<Self> ) -> Result<()>

Writes a prelude to the beginning of the output stream.

Should include a newline after if needed.

source

fn write_slice<W: Write>( &self, out: &mut W, slice: Slice, info: &SignalInfo ) -> Result<()>

Writes a slice.

Should not include a newline at the end.

source

fn write_postlude<W: Write>( &self, out: &mut W, lib: &Library<Self> ) -> Result<()>

Writes a postlude to the end of the output stream.

Object Safety§

This trait is not object safe.

Implementors§