Making A Symbol out of C-Block

Hey QSPICERS,

I’ve a C-Block which works fines, I tried to make a symbol library for that block however I’m getting below error:

Fatal error: No evaluation function found in c:\...\...\documents\qspice\libsnamcho\c-models\triplephaseshift_x1.dll

Here is my symbol:

What am I missing?

Thank you

1 Like

I revised the explanation to fully describe all possible methods I know for linking to the DLL file.

1 Like

Hi, namcho.

The message suggests that the DLL is found but does not contain the evaluation function. For your DLL, the eval function must be named “triplephaseshift_x1()” (all lower case).

Did you perhaps rename the DLL without changing the eval function name to match and recompiling?

–robert

Thank you Robert, just looked at it again after case was solved with Kelvin’s help, as you said, it works, glad to able to catch that point as well :slight_smile:

Just a follow up here.

I ran into the same problem as namcho. I believe I tried all combinations of the above solutions and the only one that actually worked which created a portable C Block symbol was:

  • Create C Block and a symbol in its own folder - likely a DLL parent or related directory holding your part library. Build a unit test case schematic and verify operation.
  • Create new symbol file and copy C Block symbol from your original and tested schematic into the symbol file. Make sure to set the property of hierarchical block. Save and set the local IP library folder as in KSKelvin’s Method #2 for declaring .libpath above to locate it for your IP. The .dll file must be located here as well. I noted that for C Blocks this is for convenience only so that you can drag and drop the symbol into a future schematic. The symbol file must exist. There is more work to be done :slight_smile:
  • Create a new schematic to demonstrate portability and drag the new C Block from the Symbols & IP. DO NOT ENTER THE LIBRARY FILE ATTRIBUTE FOR THIS SYMBOL IN THIS SCHEMATIC
    The parameter is entered in the symbol and handled there.
  • Add a .libpath entry (relative or absolute) to the schematic.
    I believe there is a bug in @KSKelvin’s statement above because this is REQUIRED in the schematic.
    — Method #2 on its own will not work. This would be more ideal and similar to any other (Non-C or Verilog based symbol) IP.
  • Build your new schematic and the simulation will work with your library C Block.

I haven’t tested this for Verilog, but suspect the method is identical. If you need to use a block utilizing both C/Verilog and other components, see the post Combine QSPICE Netlist and Verilog DLLs into a Symbol - QSPICE - Qorvo Tech Forum

Don’t forget that if you update your base file for any reason you have to recompile and (possibly) redistribute the new DLL and symbol file.

Unless there is something I’m missing here - I wanted to create a library of parts that I can export to others as we adopt use of the tool.

@KSKelvin & @Engelhardt - thanks to you and the team for all the hard work on QSpice!