• 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. Input through .VEC file

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 127
  • Views 5474
  • 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

Input through .VEC file

PrateekSharma
PrateekSharma over 2 years ago

Can we mention 2 Time Period in a single .vec file?
I mean for the first 20 inputs I need a time period of  8ns, and for the remaining 20 inputs I need a time period of 0.125ns.
Can we use period 8 and after 20 inputs again mention period 0.125?

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 2 years ago

    Dear PrateekSharma,

    PrateekSharma said:
    I mean for the first 20 inputs I need a time period of  8ns, and for the remaining 20 inputs I need a time period of 0.125ns.
    Can we use period 8 and after 20 inputs again mention period 0.125?

    As an alternative, perhaps the following awk script (executable from a UNIX prompt) might satisfy your needs. Basically, you set the period in your vector file to the minimum period - in your case 125 ps. Then, using your tabular vector inputs (one period per vector where the period is 8000 ps for the first 20 vectors and 125 ps for all vectors beyond that, run the folliowing awk script. It will expand your vectors to repeat the first 20 vector lines by (8000 ps/125 ps) and leave th remaining vectors unchanged. This effectively sets the period of the first 20 vectors to 8000 ps and the remaining to 125 ps. The script has arguments corresponding the to the maximum period (per_max) and minimum period (per_min) and the vector number beyond which the period is changed from per_max to per_min (vector N). I've attached an example with the script shown at the end of the example. In the example, the sample vector file has 24 lines. Hence the expanded vector file should have 20*(8000 ps/125 ps) + 4 lines. I've shown that this is the case. The example input vector file is also attached.

    Shawn

    Fullscreen example.txt Download
    $ wc -l test.txt
          24 test.txt
    $ head -3 test.txt
    0	1	1
    1	1	1
    0	1	1
    $ awk -f make_common_period_vec_file.awk N=20 per_max=8000 per_min=125 test.txt > new_test.txt
    $ wc -l new_test.txt
        1284 new_test.txt
    $ expr 20*8000/125+4 | bc
    1284
    
    $ cat make_common_period_vec_file.awk
    
    
    BEGIN {FS = "\t"; OFS = "\t";}
    {
    if (NR < (N + 1))
       {
       for (i = 0;i<(per_max/per_min);i++)
          {
          printf("%s\n",$0);
          }
       }
    else
       printf("%s\n",$0);
    }
    $ 
    Fullscreen make_common_period_vec_file.awk.txt Download
    
    BEGIN {FS = "\t"; OFS = "\t";}
    {
    if (NR < (N + 1))
       {
       for (i = 0;i<(per_max/per_min);i++)
          {
          printf("%s\n",$0);
          }
       }
    else
       printf("%s\n",$0);
    }
    
    Fullscreen 5025.test.txt Download
    0	1	1
    1	1	1
    0	1	1
    1	1	1
    1	1	1
    1	0	0
    1	0	1
    1	1	0
    0	1	1
    0	0	0
    0	1	0
    0	0	1
    1	1	0
    1	1	1
    1	0	0
    0	0	0
    0	0	1
    1	1	1
    1	0	1
    0	0	0
    1	0	1
    0	0	1
    0	0	1
    1	1	1
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to ShawnLogan

    Simpler still, just use two vector files - one for each set of signals (one for the first 20 inputs with the period of 8ns, and a second for the second 20 inputs with a period of 0.125ns). You can only have a single period in each file, but in this case splitting it into two files doesn't seem particularly onerous to me?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to ShawnLogan

    Simpler still, just use two vector files - one for each set of signals (one for the first 20 inputs with the period of 8ns, and a second for the second 20 inputs with a period of 0.125ns). You can only have a single period in each file, but in this case splitting it into two files doesn't seem particularly onerous to me?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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