• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. Creating .csv files for import into Assembler Outputs S...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 126
  • Views 7850
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating .csv files for import into Assembler Outputs Setup

G203
G203 over 1 year ago

I have currently written a script using VBA to generate a .CSV file to import into Maestro. My intention is to generate expressions for s-parameters and Gmax, Gp outside of Cadence (in an Excel File, so that I don't have to set them up using the Virtuoso Calculator) and then import them into ADE Assembler Outputs Setup (Virtuoso IC.1.8-64b.500.31). I've mostly succeeded with importing s-parameters, but Cadence doesn't read my .CSV file if it contains the expressions for gmax and gp, or virtually anything that contains a double quote ("). I eventually found out that even though my expressions for gmax and gp are generated correctly in my Excel and exported .CSV file, when I open them with Notepad, a lot of extra double quotes get added, which causes Virtuoso to generate an error (Images attached below). I tried exporting an existing maestro testbench to a .CSV file and opened it with Notepad, to find that the gp and gmax expressions don't have all the additional quotes. How does Cadence generate these .CSV files without producing the additional quotes? Additionally, does Cadence read .txt files that I can import instead? 

PS - I understand that this question overlaps with Microsoft Excel, but I am just trying to find a way to create a .CSV file that can be imported into Cadence, by reversing the process Cadence uses to export the maestro testbench to a .CSV file. 

I use an Excel Userform to generate the gp/gmax expressions: 

Exported to csv:

On opening csv with Notepad: 

 - extra quote marks here which causes the following error when I try to import it into Cadence. 

Any advice would be appreciated regarding reversing the .CSV process followed by Cadence. 

Thank you. 

  • Cancel
  • ShawnLogan
    ShawnLogan over 1 year ago

    Dear G203,

    G203 said:
    but Cadence doesn't read my .CSV file if it contains the expressions for gmax and gp, or virtually anything that contains a double quote ("). I eventually found out that even though my expressions for gmax and gp are generated correctly in my Excel and exported .CSV file, when I open them with Notepad, a lot of extra double quotes get added, which causes Virtuoso to generate an error (Images attached below).

    I understand. The double-quotes are actually part of the standard for a comma-separated variable file. As you have discovered, the file format is not interpreted as per the standard by Assembler. I have experience this same issue. However, a simple bash script will remove the added quotations and preserve this required in your expressions I believe. I just tried it on some csv files generated by Excel using valid Cadence output expressions and it appears to do what I hoped. The script is attached as a txt file in order that I could upload it.

    Remove the .txt extension, make it executable and it should run on your UNIX platform. The syntax is:

    translate_csv.sh <input_csv_filename> <output_csv_filename>

    Here is an example file and the resultant output:

    $ cat test_nmos_outputs_test.csv
    Name,Type,Output,Plot,Save
    ,terminal,/id/PLUS,,t
    ,terminal,/MN0/D,,
    ,net,/vd,,t
    ,net,/vdrain,,t
    ,net,/vgate,,t
    ,terminal,/M0/D,,t
    gm_over_id,expr,"(OS(""/M0"" ""gm"" ""/scratch/noclean/dcd_serdes/sml/simulation/spectre/test_nmos/spectre/schematic"") / i(""/M0/D"" ?result ""dc""))",,
    id_over_W,expr,"(i(""/M0/D"" ?result ""dc"") / VAR(""W""))",,t
    gm_over_id/Id_over_W,expr,waveVsWave(?x id_over_W ?y gm_over_id),t,
    $
    $ translate_csv.sh test_nmos_outputs_test.csv assembler_test_nmos_outputs_test.csv
    Done. Output filename is "assembler_test_nmos_outputs_test.csv".
    $ cat assembler_test_nmos_outputs_test.csv
    Name,Type,Output,Plot,Save
    ,terminal,/id/PLUS,,t
    ,terminal,/MN0/D,,
    ,net,/vd,,t
    ,net,/vdrain,,t
    ,net,/vgate,,t
    ,terminal,/M0/D,,t
    gm_over_id,expr,(OS("/M0" "gm" "/scratch/noclean/dcd_serdes/sml/simulation/spectre/test_nmos/spectre/schematic") / i("/M0/D" ?result "dc")),,
    id_over_W,expr,(i("/M0/D" ?result "dc") / VAR("W")),,t
    gm_over_id/Id_over_W,expr,waveVsWave(?x id_over_W ?y gm_over_id),t,
    $
    $

    I hope this helps and I understood your question G203!

    Shawn

    Fullscreen translate_csv.sh.txt Download
    #!/bin/bash
    
    if [ $# -ne 2 ]; then
       echo "Usage: translate_csv_file <input_csv_filename> <output_csv_filename>"
       exit 127
    fi
    
    cat $1 | tr -s '""' '"' | sed '1,$s/\,"/\,/g' | sed '1,$s/"\,/\,/g' | sed '1,$s/"$//g' > $2
    
    echo "Done. Output filename is \"$2\"."
    
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • G203
    G203 over 1 year ago in reply to ShawnLogan

    Thank you very much, this helped! ShawnLogan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 1 year ago in reply to G203

    Dear G203,

    I am very happy to read that you have made some good progress - great! Thank you for letting us know!

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. 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. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information