7905bcdcecba07a050c806fd08504ebfba323717
[fleet.git] / tests / dcache / dcache-read.fleet
1 // output ///////////////////////////////////////////////////////////////////
2 #expect 14
3 #expect 13
4 #expect 12
5 #expect 11
6
7 // program //////////////////////////////////////////////////////////////////
8 #ship debug        : Debug
9 #ship dscratch       : Dscratch
10 #ship fifo         : Fifo
11
12 // dumb configurations
13 debug.data:        [*] take, deliver;
14 dscratch.write_addr: [*] take, deliver;
15 dscratch.write_data: [*] take, deliver;
16 dscratch.read_addr:  [*] take, deliver;
17 fifo.in:           [*] take, deliver;
18
19 // addresses and values to initialize the dscratch with
20 1:  sendto dscratch.write_addr;
21 2:  sendto dscratch.write_addr;
22 3:  sendto dscratch.write_addr;
23 4:  sendto dscratch.write_addr;
24 11: sendto dscratch.write_data;
25 12: sendto dscratch.write_data;
26 13: sendto dscratch.write_data;
27 14: sendto dscratch.write_data;
28
29 // send write-completion tokens to the fifo output
30 dscratch.write_done:
31   [*] take, sendto fifo.out;
32
33 // when the write-completion tokens accumulate, unleash
34 // the read addresses
35 fifo.out:
36   [4] wait;
37   [4] take, sendto dscratch.read_addr;
38
39 // read addresses
40 4:  sendto fifo.in;
41 3:  sendto fifo.in;
42 2:  sendto fifo.in;
43 1:  sendto fifo.in;
44
45 // data read from dscratch goes to the debug ship
46 dscratch.read_data:
47   [*] take, sendto debug.data;
48