You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing parameter declarations in 'X' prefix mos device declaration #401
I managed to fix some of the issues using the following changes:
number_of_positionals=prefix_data.number_of_positionals_minifnumber_of_positionalsandstop_locationisnotNone: # model is optionaladditional, stop_location=self._line.read_words(stop_location, number_of_positionals)
self._parameters.extend(additional)
ifprefix_data.multi_devicesandstop_locationisnotNone:
remaining, stop_location=self._line.split_words(stop_location, until='=')
self._parameters.extend(remaining)
# Fix missing parameters in X mosfet device model declarationsifprefix_data.has_variable_number_of_pinsandstop_locationisnotNone:
remaining, stop_location=self._line.split_words(stop_location, until='\n\r')
self._parameters.extend(remaining)
This code prevents the model parameter from being overwritten, and also reads the remainder of the parameters for the device declaration with 'X' prefix.
However when exporting the circuit, all positional parameters appear before nodes and model declaration, which is an issue.
Edit 2)
After further reading and debugging, I managed to solve the issue by not updating the positional parameters, but the optionals using the has_optionals flag of the PrefixData Class:
self.has_variable_number_of_pins=prefixin ('Q', 'X') # NPinElement, Q has 3 to 4 pinsself.has_optionals=prefixin ('Q', 'X')
This way we can read out the parameters and correctly export the netlist back to a spice file with nodes and parameters in correct order.
Activity
das-dias commentedon Jun 11, 2025
I managed to fix some of the issues using the following changes:
This code prevents the model parameter from being overwritten, and also reads the remainder of the parameters for the device declaration with 'X' prefix.
However when exporting the circuit, all positional parameters appear before nodes and model declaration, which is an issue.
Edit 2)
After further reading and debugging, I managed to solve the issue by not updating the positional parameters, but the optionals using the has_optionals flag of the PrefixData Class:
This way we can read out the parameters and correctly export the netlist back to a spice file with nodes and parameters in correct order.