Skip to content
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

Merged
merged 55 commits into from
Nov 2, 2023
Merged

feat(primitives): revamp schematic primitives #291

merged 55 commits into from
Nov 2, 2023

Conversation

rohanku
Copy link
Contributor

@rohanku rohanku commented Aug 17, 2023

No description provided.

docs/examples/examples/core.rs Outdated Show resolved Hide resolved
libs/scir/src/drivers.rs Outdated Show resolved Hide resolved
libs/scir/src/lib.rs Outdated Show resolved Hide resolved
@@ -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 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to modify this.

libs/spice/src/parser/conv.rs Show resolved Hide resolved
codegen/src/block/mod.rs Show resolved Hide resolved
tests/src/schematic.rs Outdated Show resolved Hide resolved
tests/src/shared/buffer/schematic.rs Outdated Show resolved Hide resolved

#[derive(Clone, Copy, Hash, PartialEq, Eq, Serialize, Deserialize, Block)]
#[substrate(io = "VdividerIo", flatten)]
#[substrate(io = "VdividerIo", kind = "block::Cell")]
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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.

@@ -205,10 +205,10 @@ impl LibraryBuilder {
.entered();

// Cannot validate blackbox cells.
if cell.contents().is_opaque() {
if cell.contents().is_blackbox() {
Copy link
Contributor

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();
Copy link
Contributor Author

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 _?

@@ -913,7 +906,8 @@ impl LibraryBuilder {
} else {
instance_names.push(inst.name().clone());
}
id = inst.cell();
todo!()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sketchy

fn hash<H: Hasher>(&self, state: &mut H) {
self.cell.hash(state);
self.ports.hash(state);
self.params.iter().collect::<Vec<_>>().hash(state);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sketchy

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 1800 lines in your changes are missing coverage. Please review.

Files Coverage Δ
codegen/src/io.rs 89.09% <ø> (ø)
codegen/src/lib.rs 100.00% <ø> (ø)
libs/enumify_macros/src/lib.rs 100.00% <ø> (ø)
pdks/sky130pdk/src/corner.rs 7.50% <100.00%> (ø)
substrate/src/layout/mod.rs 67.00% <100.00%> (ø)
substrate/src/lib.rs 100.00% <ø> (ø)
substrate/src/pdk/corner.rs 75.00% <ø> (ø)
substrate/src/pdk/mod.rs 100.00% <ø> (ø)
substrate/src/simulation/data.rs 66.66% <100.00%> (ø)
substrate/src/simulation/mod.rs 46.15% <ø> (ø)
... and 56 more

📢 Thoughts on this report? Let us know!.

@rohanku rohanku merged commit e5ba06a into main Nov 2, 2023
5 checks passed
@rohanku rohanku deleted the primitives branch November 2, 2023 00:11
@rohanku rohanku mentioned this pull request Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants