Cadence® system design and verification solutions, integrated under our System Development Suite, provide the simulation, acceleration, emulation, and management capabilities.
System Development Suite Related Products A-Z
Cadence® digital design and signoff solutions provide a fast path to design closure and better predictability, helping you meet your power, performance, and area (PPA) targets.
Full-Flow Digital Solution Related Products A-Z
Cadence® custom, analog, and RF design solutions can help you save time by automating many routine tasks, from block-level and mixed-signal simulation to routing and library characterization.
Overview Related Products A-Z
Driving efficiency and accuracy in advanced packaging, system planning, and multi-fabric interoperability, Cadence® package implementation products deliver the automation and accuracy.
Cadence® PCB design solutions enable shorter, more predictable design cycles with greater integration of component design and system-level simulation for a constraint-driven flow.
An open IP platform for you to customize your app-driven SoC design.
Comprehensive solutions and methodologies.
Helping you meet your broader business goals.
A global customer support infrastructure with around-the-clock help.
24/7 Support - Cadence Online Support
Locate the latest software updates, service request, technical documentation, solutions and more in your personalized environment.
Cadence offers various software services for download. This page describes our offerings, including the Allegro FREE Physical Viewer.
Get the most out of your investment in Cadence technologies through a wide range of training offerings.
This course combines our Allegro PCB Editor Basic Techniques, followed by Allegro PCB Editor Intermediate Techniques.
Virtuoso Analog Design Environment Verifier 16.7
Learn learn to perform requirements-driven analog verification using the Virtuoso ADE Verifier tool.
Exchange ideas, news, technical information, and best practices.
The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information.
It's not all about the technlogy. Here we exchange ideas on the Cadence Academic Network and other subjects of general interest.
Cadence is a leading provider of system design tools, software, IP, and services.
I am trying to write the entire wave (ie, time vs values) into a text file. The problem is that I am overwriting the file with the latest values of waves. What I need to do is to append the information in one file, as I execute my ocean script.
Here is my piece of code:
(some code here)
;run analysisanalysis( 'tran ?stop "500n" ?errpreset "moderate");save all the waveformssave( 'all );run the simulationrun();select the results nowselectResult( 'tran );print the data to a text filem0=vm("/mult_output<0>")m1=vm("/mult_output<1>")m2=vm("/mult_output<2>")m3=vm("/mult_output<3>")m4=vm("/mult_output<4>")m5=vm("/mult_output<5>")m6=vm("/mult_output<6>")m7=vm("/mult_output<7>")m8=vm("/mult_output<8>")m9=vm("/mult_output<9>")m10=vm("/mult_output<10>")m11=vm("/mult_output<11>")m12=vm("/mult_output<12>")m13=vm("/mult_output<13>")m14=vm("/mult_output<14>")m15=vm("/mult_output<15>")
;*********First Print**************ocnPrint( ?output "results.txt" ?numberNotation 'scientific ?numSpaces 1 m0 m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14 m15 );ocnPrint( output_file ?numberNotation 'scientific ?numSpaces 1 m0 m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14 m15 )drain( output_file )c0=vm("/cmp_out<0>")c1=vm("/cmp_out<1>")c2=vm("/cmp_out<2>")c3=vm("/cmp_out<3>")c4=vm("/cmp_out<4>")c5=vm("/cmp_out<5>")c6=vm("/cmp_out<6>")c7=vm("/cmp_out<7>")c8=vm("/cmp_out<8>")c9=vm("/cmp_out<9>")c10=vm("/cmp_out<10>")c11=vm("/cmp_out<11>")c12=vm("/cmp_out<12>")c13=vm("/cmp_out<13>")c14=vm("/cmp_out<14>")c15=vm("/cmp_out<15>");***************Second Print**********************ocnPrint( ?output "results.txt" ?numberNotation 'scientific ?numSpaces 1 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 );ocnPrint( output_file ?numberNotation 'scientific ?numSpaces 1 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 )close( output_file )
So, what happens here is that the information written by the second print statement overwrites the first one. I also tried the p_port method (the lines have been commented), as it outputs to the screen.
I tried fprintf also, but, it always write only the last of the values in the signal vector.
Can someone please suggest something?
Thanks a lot!
I have not played with this just now, but I am somewhat surprised that using the p_port input to the ocnPrint function does not work.
The way that I would expect to use this is to open the file in append mode, print to it with multiple ocnPrint statements and even fprintf statements, and then close the port. Something like:
filePtr = outfile("myfile" "a")
;; some code, then print
ocnPrint( ?output filePtr ... )
;; some more code, then print
ocnPrint( ?output filePtr ... )
;; even more code, then print
frintf( filePtr ... )
;; done, close the file handle
close( filePtr )
If you call ocnPrint with a filename for ?outfile, then I believe that it would open the file in "w" (write) mode each time and effectively overwrite the contents of the file each time.
I hope that the above helps.
In reply to skillUser:
hi, i got one question regarding to the ocnprint. the following is my script
ocnPrint(?output "/home/result.txt" f1,q1)ocnPrint(?output "/home/result.txt" f2,q2)ocnPrint(?output "/home/result.txt" f3,q3)
i would like to print the f2 and q2 in the next line of f1 and q1, but i realize that the latest print will replace the older one, how can i use the "append" command to fix my problem??
thank you for your advice