Top Up Prev Next Bottom Contents Index Search

3.11 A wormhole example

Here is an example of a simulation that contains both an SDF portion and a DE portion. In this example, a Poisson process where particles have value 0.0 is sent into an SDF wormhole, where Gaussian noise is added to the samples. This demo shows how easy it is to use the SDF stars to perform computation on DE particles. The overall delay of the SDF wormhole is zero, so the result is simply Poisson arrivals of Gaussian noise samples.

A Wormhole has an outer domain and an inner domain. The outer domain is determined by the current domain at the time the user starts the defgalaxy command to create the wormhole. The inner domain is determined by the domain command that appears inside the galaxy definition.

reset
# create the wormhole
domain DE
defgalaxy wormBody {
domain SDF
star add Add; numports add input 2
star IIDGaussian1 IIDGaussian
alias out add output
alias in add "input#1"
connect IIDGaussian1 output add "input#2"
}
# Creating the main universe.
domain DE
star wormBody1 wormBody
star Poisson1 Poisson; star graf XMgraph
numports graf input 2
setstate graf title "Noisy Poisson Process"
setstate graf options "-P -0 original -1 noisy"
node node1
nodeconnect Poisson1 output node1
nodeconnect wormBody1 in node1
nodeconnect graf "input#1" node1
connect wormBody1 out graf "input#2"
run 40
wrapup


Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.