-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(primitives): revamp schematic primitives #291
Conversation
libs/scir/src/netlist.rs
Outdated
@@ -128,9 +125,15 @@ pub enum NetlistPrimitiveDeviceKind<'a> { | |||
/// Appropriate newlines will be added after each function call, so newlines added by | |||
/// implementors may cause formatting issues. | |||
pub trait SpiceLikeNetlister { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to modify this.
|
||
#[derive(Clone, Copy, Hash, PartialEq, Eq, Serialize, Deserialize, Block)] | ||
#[substrate(io = "VdividerIo", flatten)] | ||
#[substrate(io = "VdividerIo", kind = "block::Cell")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add back flatten
here.
) { | ||
self.set_ic_inner(SimSignal::ScirVoltage(key.clone()), value); | ||
} | ||
} | ||
|
||
impl SetInitialCondition<&NodePath, Decimal> for Options { | ||
fn set_initial_condition(&mut self, key: &NodePath, value: Decimal, ctx: &SimulationContext) { | ||
impl SetInitialCondition<&NodePath, Decimal, Spectre> for Options { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find a unified API for these type of option modifiers.
libs/scir/src/drivers.rs
Outdated
@@ -205,10 +205,10 @@ impl LibraryBuilder { | |||
.entered(); | |||
|
|||
// Cannot validate blackbox cells. | |||
if cell.contents().is_opaque() { | |||
if cell.contents().is_blackbox() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blackbox should be within-cell. replace current blackbox with external module.
@@ -84,7 +88,7 @@ fn can_generate_flattened_vdivider_array_schematic() { | |||
let vdiv3 = crate::shared::vdivider::flattened::Vdivider::new(20, 20); | |||
let vdivs = vec![vdiv1, vdiv2, vdiv3]; | |||
let vdivider = crate::shared::vdivider::flattened::VdividerArray { vdividers: vdivs }; | |||
let RawLib { scir, conv: _ } = ctx.export_scir(vdivider).unwrap(); | |||
let RawLib { scir, conv: _ } = ctx.export_scir::<Spice, _>(vdivider).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to get rid of the _
?
libs/scir/src/lib.rs
Outdated
@@ -913,7 +906,8 @@ impl LibraryBuilder { | |||
} else { | |||
instance_names.push(inst.name().clone()); | |||
} | |||
id = inst.cell(); | |||
todo!() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sketchy
substrate/src/pdk/primitives.rs
Outdated
fn hash<H: Hasher>(&self, state: &mut H) { | ||
self.cell.hash(state); | ||
self.ports.hash(state); | ||
self.params.iter().collect::<Vec<_>>().hash(state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sketchy
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
No description provided.