Coder Social home page Coder Social logo

bigspicy's Issues

AttributeError: 'EnumTypeWrapper' object has no attribute 'INPUT'

Expected Behavior

For the script to go beyond the import statments

Actual Behavior

  File "./bigspicy.py", line 24, in <module>
    import circuit_writer
  File "/media/karim/Elements/work/bigspicy/circuit_writer.py", line 24, in <module>
    class CircuitWriter():
  File "/media/karim/Elements/work/bigspicy/circuit_writer.py", line 27, in CircuitWriter
    circuit.Port.Direction.INPUT: circuit_pb.Port.Direction.INPUT,
AttributeError: 'EnumTypeWrapper' object has no attribute 'INPUT'

Steps to Reproduce the Problem

  1. clone the repo
  2. sudo apt install -y protobuf-compiler iverilog
  3. pip install -e ".[dev]"
git submodule update --init   # Make sure we pull from Vlsir/schema-proto the
                              # first time.
protoc --proto_path vlsir vlsir/*.proto vlsir/*/*.proto --python_out=.
protoc proto/*.proto --python_out=.
  1. run the script with any input output

Specifications

  • Version:
    repo version:
v0.0.1

also happens with latest commit as of this post date
python version:

❯ python3 --version
Python 3.8.10
  • Platform:
Ubuntu 20.04.3 LTS

Failure when spice netlist has a disconnected pin

When trying to import some sky130 gate level verilog, bigspicy fails with:

NotImplementedError: Is this supposed to be a disconnection?

The problem is a tie cell, in which a disconnected pin is expected (both LO and HI are rarely used together). A verilog test case:

module test (
  VGND,
  VPWR,
  hi
);
  input VGND;
  input VPWR;
  output hi;

  sky130_fd_sc_hd__conb_1 const_hi (
    .HI(hi),
    .VGND(VGND),
    .VNB(VGND),
    .VPB(VPWR),
    .VPWR(VPWR));

endmodule

And the spice:

.subckt sky130_fd_sc_hd__conb_1 VGND VNB VPB VPWR HI LO
R0 VGND LO sky130_fd_pr__res_generic_po w=480000u l=45000u
R1 HI VPWR sky130_fd_pr__res_generic_po w=480000u l=45000u
.ends

run with:

./bigspicy.py --import --verilog test.v --top test --spice_header test.spice --dump_spice test_out.spice

Verilog support for continuous assignment

I'm not sure if simple continuous assignments are valid structural Verilog, but OpenROAD (well OpenSTA) does use them in some cases, so it would be nice to support it:

// Verilog "ports" are not distinct from nets.
// Use an assign statement to alias the net when it is connected to
// multiple output ports.

Steps to Reproduce the Problem

cat << EOF > testmodule.v
module testmodule (
    in,
    out
);
    input in;
    output out;

    assign out = in;

endmodule
EOF
./bigspicy.py --import --verilog testmodule.v

Specifications

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.