I have a pipeline to export a schematic as an ADS netlist, modify the netlist file, then import and simulate the modified file using NetlistInclude. However, it seems that there is an issue with duplicate expressions when exporting a netlist.
An example can be found with the example project in ADS2016_01/examples/MW_Ckts/MMIC_LNA_wrk.7zads. The schematic under 06_LNA Simulations/1_LNA Origiinal TBs/LNA_Original_TB can be simulated directly. However, running a simulation on the netlist file generated by Simulate > Generate Netlist give this error:
Error detected by hpeesofsim during netlist flattening.
Expression 'H1' is already defined in file '<ADS netlist>', at or just before line '21'.
Trying to redefine it in file `\\mac/Home/Downloads/netlist.txt', at or just before '186'.
Please change the redefinition policy using 'Options' component if it is needed.
I have attached the generated netlist file. I am not sure how the software runs these simulations if it doesn't simulate from the netlist generated by Simulate > Generate Netlist.
Since I am already writing a parser for the contents of the file, I can add some additional code to detect these duplicate expressions. However, it is an apparent bug if an exported ADS netlist file cannot be directly re-simulated without modification.
Please review the following section of the documentation. Generally, a netlist produced from Simulate > Generate Netlist cannot be used for "out-of-the-box" simulation. My suggestion is to create a simple netlist from scratch, like the resistive pi pad example in the documentation. Gradually, you will obtain the skills to figure out why your netlist is not working. If this approach is not successful, please contact your local Technical Support department.
ADS Simulator Input Syntax