Home > Community > Forums > Custom IC Design > very long bit pattern for vbit source

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 very long bit pattern for vbit source 

Last post Tue, Jun 17 2014 1:27 AM by Andrew Beckett. 12 replies.
Started by Zitty 30 Oct 2012 02:44 PM. Topic has 12 replies and 3959 views
Page 1 of 1 (13 items)
Sort Posts:
  • Tue, Oct 30 2012 2:44 PM

    • Zitty
    • Not Ranked
    • Joined on Wed, Feb 23 2011
    • Posts 12
    • Points 195
    very long bit pattern for vbit source Reply

    Hello,

     I want to test a mixed signal design in cadence virtuoso 6.1.5 with spectre.

    To verify the functionallity of the digital part a very long input sequence, thousands of bits, is necessary.

    I tried using the vbit source. What is very usefull about this is that it is possible to adjust the voltage levels as well as the length of one bit. This makes it superior over the vpwl  at least for my application.

    I found a helpful document that makes it possible to adjust the properties of vbit in a way that it is possible to insert a design variable for the data . Another document helped me to load a bitstream from a tex-file into this design variable inside ade-l. 

    The problem is that this is only possible for short bitstreams. At least my bitstream is too long for such a proceeding.

    Is there any other approach to solve this problem?

    A stimulus file would also be very long/large...

     

    regards Zitty 

    • Post Points: 20
  • Wed, Nov 14 2012 10:36 AM

    • TonySal
    • Not Ranked
    • Joined on Fri, Oct 24 2008
    • Fremont, CA
    • Posts 5
    • Points 85
    Re: very long bit pattern for vbit source Reply

    Do you need a specific bit pattern, or would a psudeo random bit pattern be OK?

    I created a verilog-A module which generates a PRBS 2^15 - 1 bit pattern.

    Bit period can be set via a clock input signal, or with a verilog-a "timer" event generator.

    Output amplitude can be set by a parameter, or by pwr/gnd input pins.

     Hope this is helpfull.

    Tony

    • Post Points: 20
  • Thu, Nov 15 2012 7:46 AM

    • Zitty
    • Not Ranked
    • Joined on Wed, Feb 23 2011
    • Posts 12
    • Points 195
    Re: very long bit pattern for vbit source Reply

     Hey Tony,

    I need a specific bit pattern to test the digital part of my design.

    Verilog-A is a good idea but the code would become very large...

    • Post Points: 20
  • Thu, Nov 15 2012 8:47 AM

    Re: very long bit pattern for vbit source Reply

    There are several ways to tackle this problem (that I can think of). One of the ways is to use spectre's ability to define patterns (see "spectre -h pattern"). If I create a file called (say) "patterns.scs" and include it in ADE as a model library:

     // my patterns

    p1 pattern data="10111011011"
    p2 pattern data="001100100101011"
    p3 pattern data="1111100001110001100"

    Then on the vbit source (or vsource with type set to "bit"), I can set the pattern as (say) "p1,p2,p3" or "p1,p2,p2,p3,p1" - whatever you like - and it will then use the sequence of predefined patterns from the include file.

    The alternative is to use the "vector" file input. Look at Setup->Simulation Files and there's a Vector Files tab. You can add the path to vector files. For more details on the syntax, look at "spectre -h vector". The precise details of the format are in the Ultrasim User Guide (<MMSIMinstDir>/doc/UltraSim_Use/UltraSim_User.pdf) - in the chapter entitled "Digital Vector File Format"). This allows you to take a file of vectors (in different radixes) and connect to one or more signals in your circuit - replacing the need for sources on the schematic.

    Regards,

    Andrew.

    • Post Points: 50
  • Tue, Mar 12 2013 2:15 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: very long bit pattern for vbit source Reply

     Dear Andrew,

    Can the waveform generated from your second method have the rise time and fall time information intact ?

    Kind Regards,

    • Post Points: 20
  • Tue, Mar 12 2013 3:49 AM

    Re: very long bit pattern for vbit source Reply

    Not sure what you mean about having the rise time and fall time information intact, but you can specify the  rise and fall time (and various other signal characteristics) of the signals that are generated from the digital vectors. This is covered in the documentation that I mentioned earlier.

    Regards,

    Andrew

    • Post Points: 20
  • Tue, Mar 12 2013 4:11 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: very long bit pattern for vbit source Reply

    Well, I will see the doc.

    Kind Regads,

    • Post Points: 5
  • Sun, Apr 7 2013 10:56 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: very long bit pattern for vbit source Reply

     Dear Andrew,

    Actually I am trying to change the pattern of the bit Source using the ocean script.

    That is:-

    In the 1st iteration of the run say the bit Source V2 will have "p1,p2,p3"

    in the 2nd iteration of the run it will have "p2,p2,p1" and so on.

    I tried to enter a parameter 'x' in the pattern data  tab of the V2 source so that I can change it in the ocean script but it is not taking it as a variable parameter.

    Could you tell how it can be done so that I can change the pattern in the for loop ?

    Kind Regards,

     

     

    • Post Points: 20
  • Sun, Apr 7 2013 11:44 PM

    Re: very long bit pattern for vbit source Reply

    OK, this isn't entirely trivial. Follow these steps:

    1. Copy the vbit source from analogLib into your own library, and call it vbitparam (make sure it's not called "vbit" as there is a check in the netlist procedure for being called vbit, which will defeat the next step)
    2. Tools->CDF->Edit CDF and edit the "Base" CDF for the new vbitparam cell.
    3. Go to the Simulation Information section, and select "spectre" as the simulator.
    4. Remove "data" from the otherParameters section, and add it to the instParameters section
    5. OK all the CDF editing forms
    6. In your schematic, use the vbitparam component instead of vbit and set the "Pattern parameter data" parameter to be the name of the design variable you want.
    7. In ADE or OCEAN, create a design variable with the same name as the design variable, and set the value to "p1,p2,p3" (with the quotes specified). In OCEAN this would be:
      desVar("myparam" "\"p1,p2,p3\"")

     

    What the above is doing is getting the data parameter netlisted as a normal parameter (the netlist procedure that is usually used adds quotes around it, but in this case you don't want the quotes so that the value can be interpreted as a spectre parameter), and then you are ensuring the the netlist ends up with quotes around the parameter value. For example, here's my netlist:

    simulator lang=spectre
    global 0
    parameters mypat="10010101"

    // Library name: mylib
    // Cell name: testbit
    // View name: schematic
    R0 (op 0) resistor r=1K
    V0 (op 0) vsource val1=1 val0=0 data=mypat delay=0 rise=1n fall=1n \
            period=20n type=bit

     

    Kind Regards,

    Andrew.

    • Post Points: 20
  • Mon, Apr 8 2013 5:27 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: very long bit pattern for vbit source Reply

     Dear Andrew,

    Thanks a lot.

    Just one mre thing:-

    I am also using vsource-pwl for generating the clock waveform.

    What exactly I am doing is that:-

    I have captured the transient clk waveform  of another circuit and stored it in a text file ( time  amplitude) format. This clk is for one frequency.

    I load the file in the vsource-pwl.

    Similarly I have multiple .txt files for various frequrncies.

    With the way anlogous to the way you have mentioned, can I change the file name in the loop by parameterizing it.

    In other words I can run the sumulation for multiple frequency in a for loop.

    Kind Regards,

     

    • Post Points: 20
  • Wed, Apr 10 2013 3:45 PM

    Re: very long bit pattern for vbit source Reply

    Yes, do the same with the vpwlf source, and move the file parameter from otherParameters to instParameters.

    Note, I didn't try this, but I believe it should work.

    Andrew.

    • Post Points: 5
  • Mon, Jun 16 2014 8:08 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: very long bit pattern for vbit source Reply

     Dear Andrew,

    I have a file data in column fromat.

    That is, instead of  [ p1 pattern data="10111011011" ], I have in the file ( named clk_bit.txt ) as below:-

    1

    0

    1

    1

    1

    0

    1

    .

    .

    .

    1

    0

     

    Is it possible to source this file in the VSOURCE, without editing the above file.

    If so, could you please tell how it can be done .

    Kind Regards,

    • Post Points: 20
  • Tue, Jun 17 2014 1:27 AM

    Re: very long bit pattern for vbit source Reply

    No -  you'd have to contact customer support and ask for an enhancement request to allow this to be read from a file.

    The alternative might be to use a vector file input - (vec_include) - but even that would need the file in a slightly different format (some additional information at the top).

    Andrew.

    • Post Points: 5
Page 1 of 1 (13 items)
Sort Posts:
Started by Zitty at 30 Oct 2012 02:44 PM. Topic has 12 replies.