Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VReo > VReo__Prod_Cons__LangDev
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:a7954a26d876 |
|---|---|
| 1 | |
| 2 This test app is for VReo development.. first version replicates a program | |
| 3 from the paper. It has two producers and one consumer. The circuit causes | |
| 4 the producers to take turns providing the next input that the consumer takes. | |
| 5 | |
| 6 The circuit is in the paper.. | |
| 7 | |
| 8 The way the code works, the circuit is supplied separately. A function is | |
| 9 generated by a tool, which creates the circuit data structs. Those structs | |
| 10 contain pointers to the functions that check transitions and then perform | |
| 11 transitions. | |
| 12 | |
| 13 So, the seed first starts up VReo, then it calls the create circuit Fn, | |
| 14 which returns a pointer to the circuit, then it calls create_VP three | |
| 15 times. The first, it hands it the pointer to the producer Fn, along with | |
| 16 a pointer to the circuit and an integer that indicates that it connects to | |
| 17 port 1 of the circuit. Second, it creates another producer, but connected | |
| 18 to port 2, then it creates a consumer connected to port 3. | |
| 19 | |
| 20 Then, it waits for the computation to end. | |
| 21 | |
| 22 A producer puts out 5 items, doing a print for each. The consumer consumes | |
| 23 10 items, doing a print for each. | |
| 24 | |
| 25 Then each of them call "end_VP". | |
| 26 | |
| 27 That ends the computation, and the seed comes back, and calls "end_seed_VP" | |
| 28 | |
| 29 |
