[SI-LIST] Re: Creaging Pseudo Random Bit Sequence (PRBS) stimuli for Hspice

Jonathan Fasig wrote:
>
>
>Occassionally someone will inquire about ways to create Pseudo Random Bit 
>Sequence (PRBS) stimuli to drive their simulations.  The discussion below 
>details *one* way to accomplish this task using Waveformer Pro from 
>SynaptiCAD (www.syncad.com).  The output from this procedure is one or
>more piecewise linear (PWL) independent voltage sources that can
>subsequently be used to stimulate your circuit simulations.
>
>
                ... details deleted....
                
                
Thanks for posting the useful Perl PRBS routines. I always enjoy it
when people share useful stuff like that with the list.

I've never used (or had access to) Waveformer Pro from  SynaptiCAD so
can't comment on how the perl code works with that product, but
just wanted to mention that it wouldn't be too terribly difficult
to hack Jonathon's perl code to get it to generate a spice PWL
reprensentation of the generated prbs sequence. That generated
statement then could be included into a spice deck and used to
drive some network. Then you could view the resultant eye diagram using
Awaves or some similar spice viewer tool.

About 5 minutes hack time encouraged his code to spit the results
out to the console:

radium1% perl < prbs.pl
prbs = 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 
0 1 
1 1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 
0 0 
0 1 0 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 1 0 
0 0 
0 1 1 1 0 0

I'm sure an enterprising young (or old) engineer could write a bit of perl
code to take that data and output a PWL statement.

Alternatively, one could make use of the neat little utility
Weston Beal of Mentor Graphics wrote. It is a bit of Java code
that will generate a number of various bit sequences (including PRBS)
and write the results out as a PWL spice statement. 
It is available at:

ftp://supportnet.mentor.com/pub/mentortech/icx/utilities/pulsetrain.zip

The si-list message is archived at:

http://www.freelists.org/archives/si-list/05-2002/msg00120.html

An example of the output is this 127 bit PRBS7 sequence that his 
tool generated:

PWL( 0.0n 1.0
+  10n 1.0  10.001n 0.0  15n 0.0  15.001n 1.0  30n 1.0  30.001n 0.0
+  35n 0.0  35.001n 1.0  40n 1.0  40.001n 0.0  50n 0.0  50.001n 1.0
+  55n 1.0  55.001n 0.0  60n 0.0  60.001n 1.0  70n 1.0  70.001n 0.0
+  85n 0.0  85.001n 1.0  95n 1.0  95.001n 0.0  100n 0.0  100.001n 1.0
+  120n 1.0  120.001n 0.0  125n 0.0  125.001n 1.0  135n 1.0  135.001n 0.0
+  140n 0.0  140.001n 1.0  145n 1.0  145.001n 0.0  150n 0.0  150.001n 1.0
+  160n 1.0  160.001n 0.0  165n 0.0  165.001n 1.0  175n 1.0  175.001n 0.0
+  185n 0.0  185.001n 1.0  190n 1.0  190.001n 0.0  200n 0.0  200.001n 1.0
+  205n 1.0  205.001n 0.0  220n 0.0  220.001n 1.0  235n 1.0  235.001n 0.0
+  255n 0.0  255.001n 1.0  260n 1.0  260.001n 0.0  265n 0.0  265.001n 1.0
+  290n 1.0  290.001n 0.0  300n 0.0  300.001n 1.0  305n 1.0  305.001n 0.0
+  310n 0.0  310.001n 1.0  315n 1.0  315.001n 0.0  320n 0.0  320.001n 1.0
+  335n 1.0  335.001n 0.0  345n 0.0  345.001n 1.0  355n 1.0  355.001n 0.0
+  360n 0.0  360.001n 1.0  365n 1.0  365.001n 0.0  380n 0.0  380.001n 1.0
+  385n 1.0  385.001n 0.0  395n 0.0  395.001n 1.0  415n 1.0  415.001n 0.0
+  430n 0.0  430.001n 1.0  435n 1.0  435.001n 0.0  440n 0.0  440.001n 1.0
+  445n 1.0  445.001n 0.0  465n 0.0  465.001n 1.0  475n 1.0  475.001n 0.0
+  500n 0.0  500.001n 1.0  505n 1.0  505.001n 0.0  535n 0.0  535.001n 1.0
+  570n 1.0  570.001n 0.0  575n 0.0  575.001n 1.0  580n 1.0  580.001n 0.0
+  585n 0.0  585.001n 1.0  590n 1.0  590.001n 0.0  595n 0.0  595.001n 1.0
+  600n 1.0  600.001n 0.0  610n 0.0  610.001n 1.0  620n 1.0  620.001n 0.0
+  630n 0.0  630.001n 1.0  635n 1.0 )


Of course there are a multitude of ways to accomplish the same task.
I've done it with matlab before which worked out quite well.

Thanks to both Jonathan and Weston for useful contributions.

-Ray Anderson
Sun Microsystems

------------------------------------------------------------------
To unsubscribe from si-list:
si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field

or to administer your membership from a web page, go to:
http://www.freelists.org/webpage/si-list

For help:
si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field

List archives are viewable at:     
                http://www.freelists.org/archives/si-list
or at our remote archives:
                http://groups.yahoo.com/group/si-list/messages 
Old (prior to June 6, 2001) list archives are viewable at:
                http://www.qsl.net/wb6tpu
  

Other related posts: