Menu

Feature suggestion - device_model variables display

George
2024-02-06
2024-02-10
  • George

    George - 2024-02-06

    Hello!
    It would be great to have ability to display some model parameters from device_model property
    by using text with alias in props.
    Now we can put text @device_model with props name= and it displays the content of property device_model, but it would be cool to have ability to display parameter values, for example:

    name=A5 model=summer@name device_model=".model summer@name summer in_offset=[0.0 0.0] in_gain=[1 1] out_gain=1.0 out_offset=0.0" 
    

    and we can print it like this:

    @device_model.in_gain name=A5
    

    and result text is in_gain=[1 1]
    (or set such behaviour in symbols properties how we do it for instance parameters, not model parameters, on attached screenshot)
    I understand that it could be not the super priority, but it could really improve how we visualise the uniq
    property of particular instance.

     
  • stefan

    stefan - 2024-02-06

    You just need to offload the parameters (param=1234) you want to display out of the device_models attribute and use param=@param inside device_models.
    The text @param in the symbol will translate to the value 1234.

    See the example below for BETA spice model parameter for a N-ch JFET:

     

    Last edit: stefan 2024-02-06
    • George

      George - 2024-02-07

      That's all!? Cool, thank you!

       
    • George

      George - 2024-02-08

      Is there a way to do that by default in symbol properties in the same way as for instances parameters?

       
      • George

        George - 2024-02-09

        The only variant that I can see now is to encapsulate each device with model into subcircuit with passing all parameters of the model through .subckt ...

         
  • dick freebird

    dick freebird - 2024-02-09

    I'm encountering a lot of subcircuit-style models (like a NPN
    transistor in JI technology, embeds a parasitic PNP or two, and
    the parasitics are distributed among the sub-elements under a
    symbol, out of sight).

    So in this case I would need to figure out, and make relative-
    path (using @path I guess) "pick-offs" that include that first
    step into the subcircuit. Or maybe, even maths on values
    (like if terminal capacitance is the sum of two sub-transistors'
    Cjc and Ccs, say).

    I'll try to remember to dig up an example to explore this.

     
  • stefan

    stefan - 2024-02-09

    George, Can you prepare a small test schematic (or better put the needed files in an empty dir and do a zip / tar file) with the desired feature? You can place text objects in the schematic telling what you expect.

     
    • George

      George - 2024-02-10

      Hi, attached circuit with embedded symbol.
      I want to have some model parameters to be visible, but it should be set as default in component properties (like instance parameter)

       
  • stefan

    stefan - 2024-02-10

    George please update xschem and test this slightly modified test schematic (based on tour example.sch)

     
    • George

      George - 2024-02-10

      Just checked, it works, thank you a lot!

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.