annotate Design_Notes.txt @ 0:5b757d5a7044

Initial add -- fully working
author Sean Halle <seanhalle@yahoo.com>
date Wed, 12 Jun 2013 15:13:34 -0700
parents
children
rev   line source
seanhalle@0 1
seanhalle@0 2 This test app is for VReo development.. first version replicates a program
seanhalle@0 3 from the paper. It has two producers and one consumer. The circuit causes
seanhalle@0 4 the producers to take turns providing the next input that the consumer takes.
seanhalle@0 5
seanhalle@0 6 The circuit is in the paper..
seanhalle@0 7
seanhalle@0 8 The way the code works, the circuit is supplied separately. A function is
seanhalle@0 9 generated by a tool, which creates the circuit data structs. Those structs
seanhalle@0 10 contain pointers to the functions that check transitions and then perform
seanhalle@0 11 transitions.
seanhalle@0 12
seanhalle@0 13 So, the seed first starts up VReo, then it calls the create circuit Fn,
seanhalle@0 14 which returns a pointer to the circuit, then it calls create_VP three
seanhalle@0 15 times. The first, it hands it the pointer to the producer Fn, along with
seanhalle@0 16 a pointer to the circuit and an integer that indicates that it connects to
seanhalle@0 17 port 1 of the circuit. Second, it creates another producer, but connected
seanhalle@0 18 to port 2, then it creates a consumer connected to port 3.
seanhalle@0 19
seanhalle@0 20 Then, it waits for the computation to end.
seanhalle@0 21
seanhalle@0 22 A producer puts out 5 items, doing a print for each. The consumer consumes
seanhalle@0 23 10 items, doing a print for each.
seanhalle@0 24
seanhalle@0 25 Then each of them call "end_VP".
seanhalle@0 26
seanhalle@0 27 That ends the computation, and the seed comes back, and calls "end_seed_VP"
seanhalle@0 28
seanhalle@0 29