The tool versions are below:
Virtuoso IC 6.1.8-64b.500.15
Spectre 19.1.0.541.isr14
I used a maestro Assembler view to perform a two step trimming procedure followed by the main_test simulation. The main_test used the two trimming codes generated by the two successive trimming procedures and passed using calcVal.
The first trimming step, called trim_vbg, searched for the code for which a voltage named vbg_npn crossed 1.25V. I used the following expression to calculate the correct trimming value called trim_bg_val:
round(cross(VS("/vbg_npn") 1.25 1 "rising" nil nil nil))
It worked and I passed that information to the second trimming procedure using calcVal as shown below:
calcVal("trim_bg_val" "trim_vbg")
The second trimming procedure called trim_ib, searched for the cade for which another voltage called ibt_2u_npn<0> crossed 1.0V. I tried to use the same type of expression to calculate the correct trimming value called trim_ib_val:
round(cross(VS("/ibt_2u_npn<0>") 1.0 1 "rising" nil nil nil))
I got "eval error" in that field. I tried many things and in the end what worked was to first use the following expression to calculate an intermediate results named trimx_ib_val by using:
cross(VS("/ibt_2u_npn<0>") 1.0 1 "rising" nil nil nil)
followed by the following expression to calculate trim_ib_val:
round(trimx_ib_val)
Essentially I split the calculation of the trim value in two steps.
Following the two step trimming procedure I updated the design variables in the main_test as follows:
trim_npn_bg with calcVal("trim_bg_val" "trim_vbg")
trim_ib with calcVal("trim_ib_val" "trim_ib")
In the end it all worked out, and the two step trim procedure worked as expected, but I really don't understand why the initial attempt in the second trim step with "round(cross(VS("/ibt_2u_npn<0>") 1.0 1 "rising" nil nil nil))" didn't work. Can you help?
Thank you