The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> variable inside PWLF file https://designers-guide.org/forum/YaBB.pl?num=1207062028 Message started by Cri Azzolini on Apr 1st, 2008, 8:00am |
Title: variable inside PWLF file Post by Cri Azzolini on Apr 1st, 2008, 8:00am Hi all, is anybody able to write a file for Spectre's PWLF voltage generator with a parameter? I need to write a file with a specific pattern of digital logical levels. I thought to PWLF generator linked to a text file containing the time-voltage pairs but I would like to define the period of the digital bits in a parametric mode in order to quickly change the signal frequency (i.e. through a ADE variable). I looked at the Cadence help but I was not able to find anything. Any suggestions? Thanks, regards. Cristiano |
Title: Re: variable inside PWLF file Post by pancho_hideboo on Apr 1st, 2008, 9:01am Cri Azzolini wrote on Apr 1st, 2008, 8:00am:
PWLF have period parameter, so you can scale or adjust period of PWLF as single period. I think you assume multiple periods in PWLF like random logic pattern. For such case, you can't use period parameter for each period in PWLF. You should use VCD file as stimulus in netlist. |
Title: Re: variable inside PWLF file Post by Cri Azzolini on Apr 1st, 2008, 9:30am Hi Panchoo, thanks for the reply but I do not need to replicate the PWL waveform. I have a defined, not random, pattern, i.e. 1001111, defined by the PWLF file and I would like to change the period of both 0's and 1's bit time of the stimulous with a parameter or variable. Maybe there is a special sintax in order to insert design variable in the PWLF file but I was not able to find that. Any suggestions? Thanks, bye! Cri |
Title: Re: variable inside PWLF file Post by John O Donovan on Apr 1st, 2008, 9:53am Hi, You can't used netlist parameters within the PWLF file. However, since you are generating a digital signal, you could use Spectre's build-in bit vsource. Do a spectre -h vsource, you can specify type=bit, then use val0, val1, rise, fall and period, rptstart, rpttimes, edgetype, delay and data for describing the pattern. If you look at spectre -h pattern, you can see how the patterns can be defined, although it is not necessary to use the pattern device. Regards, John |
Title: Re: variable inside PWLF file Post by pancho_hideboo on Apr 1st, 2008, 10:01am Cri Azzolini wrote on Apr 1st, 2008, 9:30am:
Your needs is mutiple periods or local period. You expect something like "1,0[2],1[4]" for expressing "1001111". Such syntax is possible, for example, in Agilent ADS's Ptolemy. As John O Donovan says, we can do same repeat as Ptolemy using vsource(type=bit) with pattern statement in Spectre. %spectre -h pattern ******* Pattern ******* Patterns are used to specify the digital bit string. Parameter data must be given. It is a string consists of 1, 0, m and z. For example, data="1011mz11". It can also contain a previous defined pattern. For example: p1 pattern data="111000" p2 pattern data="1z,p1,z0" Here, data of p2 is tha same as "1z111000z0". parameters rptstart and rpttimes are used to specify the repeat pattern of the bit string. For example: pa pattern data="110mz1" rptstart=3 rpttimes=2 The bit string will be "110mz10mz10mz1". If there are predifined patterns in the data string, the bit string is flattened first, then repeat as specified by rptstart and rpttimes. For example: p1 pattern data="111000" p2 pattern data="1z,p1,z0" rptstart=4 rpttimes=1 The bit string of p2 is "1z111000z011000z0". This device is supported within altergroups. Synopsis: Name pattern <parameter=value> ... =================== Instance Parameters =================== 1 data The bit string. A string that contains a series of the four states, 1 0 m z. 2 rptstart=1 The starting bit when repeating. The data repeats from the specified bit to the end of the bit string. The parameter should be an integer from 1 to the length of the bit string. 3 rpttimes=0 The repeat times. The output will maitain the state of the last bit after the last repeat. The parameter should be a nonnegative integer. Cri Azzolini wrote on Apr 1st, 2008, 9:30am:
Why do you think so ? Again this is impossible. You should use vsource(type=bit) with pattern statement or VCD(Value Change Dump) file as stimulus in Spectre netlist. New Features in the MMSIM6.0 USR1 Release Vector File Support Spectre has been enhanced to support the inclusion of a digital vector file, similar to the SPICE .vec statement. Spectre now understand the SPICE syntax, and also provides vec_include, vcd_include, and evcd_include statements for users working with Spectre syntax. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |