4 Replies Latest reply on May 30, 2018 5:38 PM by junli.ji

    Some questions about the difference between new modelsim and old modelsim

    junli.ji

      Dear all

                My old project include a *.do file,

      its content is as below:

      ...

      add wave -position insertpoint  \

      sim:/sine_table_vhd_tst/U1/sine_flag_o

      -unsigned sim:/sine_table_vhd_tst/U1/i1/sine_dat_i \

      ...

       

      it ran very well on old version of modelsim,

      But On the new modelsim with version of 10.7, there is a error happened,as below:

      # ** Error: invalid command name "-unsigned"

      Now I do not know how to define the type of signals in *.do file.

       

      thanks!

      br

      jjl

        • 1. Re: Some questions about the difference between new modelsim and old modelsim
          samantha_lizak

          Hi JJL-

           

          I am not a modelsim expert, but I do have a fair amount of scripting experience.  Commands very rarely have a "-" as the first character.  Does your .do file work if you add a "\" after the second line?

           

          Hope that helps-

           

          Sam.

          • 2. Re: Some questions about the difference between new modelsim and old modelsim
            junli.ji

            Hello, Sam

            Thanks for your reply!

            That is a mistake , when I posted.

            this "\" existed in my .do file,

            actually if no "\" here, the old version Modelsim also report a error.

            ...

            add wave -position insertpoint  \

            sim:/sine_table_vhd_tst/U1/sine_flag_o \

            -unsigned sim:/sine_table_vhd_tst/U1/i1/sine_dat_i \

            ...

             

            br

            JJL

            • 3. Re: Some questions about the difference between new modelsim and old modelsim
              samantha_lizak

              Is the backslash the absolute last character on that line?  I checked the Modelsim book and it appears Modelsim uses Tcl syntax. The error message says that -unsigned is an unrecognized command, not keyword or argument, so it is trying to parse it as a peer of "add wave" instead of an argument of it. 

               

              When that happens in Calibre, it typically means there is some sort of whitespace between the \ and the file's  EOL character.  (Windows XP used to add Ctrl-M if you opened an ASCII file, for instance.) If you don't want to look at the character codes in a hex editor, you could just join the sim:/sine_table_vhd_tst/U1/sine_flag_o and  -unsigned line, then place your cursor immediately after \ and press enter. (And then save, of course.)

               

              Another possible check is to remove the "-unsigned"; if the parser gives the same error about sim:sine_table_vhd_tst then it is definitely something making the parser treat the third line as a new command.

               

              Good luck-

               

              Sam.

              • 4. Re: Some questions about the difference between new modelsim and old modelsim
                junli.ji

                Hello Sam

                 

                Thanks for your help!

                I found that it's my fault.

                when I added "\" after "sine_flag_o", it can run normally.

                below is my.do file

                thanks again!

                 

                vsim work.sine_table_vhd_tst

                 

                add wave -position insertpoint  \

                -hex sim:/sine_table_vhd_tst/U1/i1/s_MT \

                \

                sim:/sine_table_vhd_tst/U1/sine_flag_o

                -unsigned sim:/sine_table_vhd_tst/U1/i1/sine_dat_i \

                \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_c1_tmp \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_c2_tmp \

                \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_sin_c1 \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_sin_c2 \

                \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_f_val \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_f_val_shift \

                \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/correct_dat_o \

                \

                -unsigned sim:/sine_table_vhd_tst/U1/i1/s_cal_step

                 

                run 100 us