Generate a sample SPICE model file.
- User
Generate a sample SPICE model file.
Assistant
Here is a sample SPICE model file:
- Sample SPICE model file
.SUBCKT my_sample_circuit in out M1 in out out 0 nmos L=0.5u W=1u R1 in out 1k C1 out 0 1n .ENDS my_sample_circuit
- Descriptions:
- .SUBCKT defines the beginning of a subcircuit definition
- my_sample_circuit is the name of the subcircuit
- in and out define the terminals of the subcircuit
- M1 models an NMOS transistor between in and out
- R1 models a 1k resistor between in and out
- C1 models a 1n capacitor between out and ground
- .ENDS defines the end of the subcircuit definition
This defines a simple subcircuit containing a MOSFET, resistor and capacitor that could be used as a building block in larger SPICE netlists. Additional models, parameters, equations etc. could be included as needed.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.