|
2 | 2 |
|
3 | 3 | {% block seq %} |
4 | 4 | {% sv_line_anchor %} |
5 | | - cb.hwif_in.r3.f.wel <= 1; |
| 5 | + cb.hwif_in.r3.f1.wel <= 1; |
| 6 | + cb.hwif_in.r3.f2.wel <= 1; |
6 | 7 | ##1; |
7 | 8 | cb.rst <= '0; |
8 | 9 | ##1; |
9 | 10 |
|
10 | 11 | // r1 - sw=rw; hw=rw; we; // Storage element |
11 | 12 | cpuif.assert_read('h0, 10); |
12 | | - assert(cb.hwif_out.r1.f.value == 10); |
13 | | - |
14 | | - cpuif.write('h0, 11); |
15 | | - cpuif.assert_read('h0, 11); |
16 | | - assert(cb.hwif_out.r1.f.value == 11); |
17 | | - |
18 | | - cb.hwif_in.r1.f.next <= 9; |
19 | | - cpuif.assert_read('h0, 11); |
20 | | - assert(cb.hwif_out.r1.f.value == 11); |
21 | | - cb.hwif_in.r1.f.next <= 12; |
22 | | - cb.hwif_in.r1.f.we <= 1; |
| 13 | + assert(cb.hwif_out.r1.f1.value == 10); |
| 14 | + assert(cb.hwif_out.r1.f2.value == 0); |
| 15 | + |
| 16 | + cpuif.write('h0, 11 + (1 << 7)); |
| 17 | + cpuif.assert_read('h0, 11 + (1 << 7)); |
| 18 | + assert(cb.hwif_out.r1.f1.value == 11); |
| 19 | + assert(cb.hwif_out.r1.f2.value == 1); |
| 20 | + |
| 21 | + cb.hwif_in.r1.f1.next <= 9; |
| 22 | + cb.hwif_in.r1.f2.next <= 0; |
| 23 | + cpuif.assert_read('h0, 11 + (1 << 7)); |
| 24 | + assert(cb.hwif_out.r1.f1.value == 11); |
| 25 | + assert(cb.hwif_out.r1.f2.value == 1); |
| 26 | + cb.hwif_in.r1.f1.next <= 12; |
| 27 | + cb.hwif_in.r1.f2.next <= 0; |
| 28 | + cb.hwif_in.r1.f1.we <= 1; |
| 29 | + cb.hwif_in.r1.f2.we <= 1; |
23 | 30 | @cb; |
24 | | - cb.hwif_in.r1.f.next <= 0; |
25 | | - cb.hwif_in.r1.f.we <= 0; |
| 31 | + cb.hwif_in.r1.f1.next <= 0; |
| 32 | + cb.hwif_in.r1.f2.next <= 0; |
| 33 | + cb.hwif_in.r1.f1.we <= 0; |
| 34 | + cb.hwif_in.r1.f2.we <= 0; |
26 | 35 | cpuif.assert_read('h0, 12); |
27 | | - assert(cb.hwif_out.r1.f.value == 12); |
| 36 | + assert(cb.hwif_out.r1.f1.value == 12); |
| 37 | + assert(cb.hwif_out.r1.f2.value == 0); |
28 | 38 |
|
29 | 39 |
|
30 | 40 | // r2 - sw=rw; hw=r; // Storage element |
31 | | - cpuif.assert_read('h1, 20); |
32 | | - assert(cb.hwif_out.r2.f.value == 20); |
| 41 | + cpuif.assert_read('h1, 20 + (1 << 7)); |
| 42 | + assert(cb.hwif_out.r2.f1.value == 20); |
| 43 | + assert(cb.hwif_out.r2.f2.value == 1); |
33 | 44 |
|
34 | 45 | cpuif.write('h1, 21); |
35 | 46 | cpuif.assert_read('h1, 21); |
36 | | - assert(cb.hwif_out.r2.f.value == 21); |
| 47 | + assert(cb.hwif_out.r2.f1.value == 21); |
| 48 | + assert(cb.hwif_out.r2.f2.value == 0); |
37 | 49 |
|
38 | 50 |
|
39 | 51 | // r3 - sw=rw; hw=w; wel; // Storage element |
40 | 52 | cpuif.assert_read('h2, 30); |
41 | 53 |
|
42 | | - cpuif.write('h2, 31); |
43 | | - cpuif.assert_read('h2, 31); |
| 54 | + cpuif.write('h2, 31 + (1 << 7)); |
| 55 | + cpuif.assert_read('h2, 31 + (1 << 7)); |
44 | 56 |
|
45 | | - cb.hwif_in.r3.f.next <= 29; |
46 | | - cpuif.assert_read('h2, 31); |
47 | | - cb.hwif_in.r3.f.next <= 32; |
48 | | - cb.hwif_in.r3.f.wel <= 0; |
| 57 | + cb.hwif_in.r3.f1.next <= 29; |
| 58 | + cb.hwif_in.r3.f2.next <= 0; |
| 59 | + cpuif.assert_read('h2, 31 + (1 << 7)); |
| 60 | + cb.hwif_in.r3.f1.next <= 32; |
| 61 | + cb.hwif_in.r3.f2.next <= 0; |
| 62 | + cb.hwif_in.r3.f1.wel <= 0; |
| 63 | + cb.hwif_in.r3.f2.wel <= 0; |
49 | 64 | @cb; |
50 | | - cb.hwif_in.r3.f.next <= 0; |
51 | | - cb.hwif_in.r3.f.wel <= 1; |
| 65 | + cb.hwif_in.r3.f1.next <= 0; |
| 66 | + cb.hwif_in.r3.f2.next <= 0; |
| 67 | + cb.hwif_in.r3.f1.wel <= 1; |
| 68 | + cb.hwif_in.r3.f2.wel <= 1; |
52 | 69 | cpuif.assert_read('h2, 32); |
53 | 70 |
|
54 | 71 |
|
55 | 72 | // r4 - sw=rw; hw=na; // Storage element |
56 | | - cpuif.assert_read('h3, 40); |
| 73 | + cpuif.assert_read('h3, 40 + (1 << 7)); |
57 | 74 | cpuif.write('h3, 41); |
58 | 75 | cpuif.assert_read('h3, 41); |
59 | 76 |
|
60 | 77 |
|
61 | 78 | // r5 - sw=r; hw=rw; we; // Storage element |
62 | 79 | cpuif.assert_read('h4, 50); |
63 | | - assert(cb.hwif_out.r5.f.value == 50); |
| 80 | + assert(cb.hwif_out.r5.f1.value == 50); |
64 | 81 |
|
65 | | - cpuif.write('h4, 51); |
| 82 | + cpuif.write('h4, 51 + (1 << 7)); |
66 | 83 | cpuif.assert_read('h4, 50); |
67 | | - assert(cb.hwif_out.r5.f.value == 50); |
| 84 | + assert(cb.hwif_out.r5.f1.value == 50); |
| 85 | + assert(cb.hwif_out.r5.f2.value == 0); |
68 | 86 |
|
69 | | - cb.hwif_in.r5.f.next <= 9; |
| 87 | + cb.hwif_in.r5.f1.next <= 9; |
| 88 | + cb.hwif_in.r5.f2.next <= 1; |
70 | 89 | cpuif.assert_read('h4, 50); |
71 | | - assert(cb.hwif_out.r5.f.value == 50); |
72 | | - cb.hwif_in.r5.f.next <= 52; |
73 | | - cb.hwif_in.r5.f.we <= 1; |
| 90 | + assert(cb.hwif_out.r5.f1.value == 50); |
| 91 | + assert(cb.hwif_out.r5.f2.value == 0); |
| 92 | + cb.hwif_in.r5.f1.next <= 52; |
| 93 | + cb.hwif_in.r5.f2.next <= 1; |
| 94 | + cb.hwif_in.r5.f1.we <= 1; |
| 95 | + cb.hwif_in.r5.f2.we <= 1; |
74 | 96 | @cb; |
75 | | - cb.hwif_in.r5.f.next <= 0; |
76 | | - cb.hwif_in.r5.f.we <= 0; |
77 | | - cpuif.assert_read('h4, 52); |
78 | | - assert(cb.hwif_out.r5.f.value == 52); |
| 97 | + cb.hwif_in.r5.f1.next <= 0; |
| 98 | + cb.hwif_in.r5.f2.next <= 0; |
| 99 | + cb.hwif_in.r5.f1.we <= 0; |
| 100 | + cb.hwif_in.r5.f2.we <= 0; |
| 101 | + cpuif.assert_read('h4, 52 + (1 << 7)); |
| 102 | + assert(cb.hwif_out.r5.f1.value == 52); |
| 103 | + assert(cb.hwif_out.r5.f2.value == 1); |
79 | 104 |
|
80 | 105 |
|
81 | 106 | // r6 - sw=r; hw=r; // Wire/Bus - constant value |
82 | | - cpuif.assert_read('h5, 60); |
83 | | - assert(cb.hwif_out.r6.f.value == 60); |
| 107 | + cpuif.assert_read('h5, 60 + (1 << 7)); |
| 108 | + assert(cb.hwif_out.r6.f1.value == 60); |
| 109 | + assert(cb.hwif_out.r6.f2.value == 1); |
84 | 110 | cpuif.write('h5, 61); |
85 | | - cpuif.assert_read('h5, 60); |
86 | | - assert(cb.hwif_out.r6.f.value == 60); |
| 111 | + cpuif.assert_read('h5, 60 + (1 << 7)); |
| 112 | + assert(cb.hwif_out.r6.f1.value == 60); |
| 113 | + assert(cb.hwif_out.r6.f2.value == 1); |
87 | 114 |
|
88 | 115 |
|
89 | 116 | // r7 - sw=r; hw=w; // Wire/Bus - hardware assigns value |
90 | 117 | cpuif.assert_read('h6, 0); |
91 | | - cb.hwif_in.r7.f.next <= 70; |
92 | | - cpuif.assert_read('h6, 70); |
| 118 | + cb.hwif_in.r7.f1.next <= 70; |
| 119 | + cb.hwif_in.r7.f2.next <= 1; |
| 120 | + cpuif.assert_read('h6, 70 + (1 << 7)); |
93 | 121 | cpuif.write('h6, 71); |
94 | | - cpuif.assert_read('h6, 70); |
| 122 | + cpuif.assert_read('h6, 70 + (1 << 7)); |
95 | 123 |
|
96 | 124 |
|
97 | 125 | // r8 - sw=r; hw=na; // Wire/Bus - constant value |
98 | 126 | cpuif.assert_read('h7, 80); |
99 | | - cpuif.write('h7, 81); |
| 127 | + cpuif.write('h7, 81 + (1 << 7)); |
100 | 128 | cpuif.assert_read('h7, 80); |
101 | 129 |
|
102 | 130 |
|
103 | 131 | // r9 - sw=w; hw=rw; we; // Storage element |
104 | 132 | cpuif.assert_read('h8, 0); |
105 | | - assert(cb.hwif_out.r9.f.value == 90); |
| 133 | + assert(cb.hwif_out.r9.f1.value == 90); |
| 134 | + assert(cb.hwif_out.r9.f2.value == 1); |
106 | 135 |
|
107 | 136 | cpuif.write('h8, 91); |
108 | 137 | cpuif.assert_read('h8, 0); |
109 | | - assert(cb.hwif_out.r9.f.value == 91); |
| 138 | + assert(cb.hwif_out.r9.f1.value == 91); |
| 139 | + assert(cb.hwif_out.r9.f2.value == 0); |
110 | 140 |
|
111 | | - cb.hwif_in.r9.f.next <= 89; |
| 141 | + cb.hwif_in.r9.f1.next <= 89; |
| 142 | + cb.hwif_in.r9.f2.next <= 1; |
112 | 143 | cpuif.assert_read('h8, 0); |
113 | | - assert(cb.hwif_out.r9.f.value == 91); |
114 | | - cb.hwif_in.r9.f.next <= 92; |
115 | | - cb.hwif_in.r9.f.we <= 1; |
| 144 | + assert(cb.hwif_out.r9.f1.value == 91); |
| 145 | + assert(cb.hwif_out.r9.f2.value == 0); |
| 146 | + cb.hwif_in.r9.f1.next <= 92; |
| 147 | + cb.hwif_in.r9.f2.next <= 1; |
| 148 | + cb.hwif_in.r9.f1.we <= 1; |
| 149 | + cb.hwif_in.r9.f2.we <= 1; |
116 | 150 | @cb; |
117 | | - cb.hwif_in.r9.f.next <= 0; |
118 | | - cb.hwif_in.r9.f.we <= 0; |
| 151 | + cb.hwif_in.r9.f1.next <= 0; |
| 152 | + cb.hwif_in.r9.f2.next <= 0; |
| 153 | + cb.hwif_in.r9.f1.we <= 0; |
| 154 | + cb.hwif_in.r9.f2.we <= 0; |
119 | 155 | cpuif.assert_read('h8, 0); |
120 | | - assert(cb.hwif_out.r9.f.value == 92); |
| 156 | + assert(cb.hwif_out.r9.f1.value == 92); |
| 157 | + assert(cb.hwif_out.r9.f2.value == 1); |
121 | 158 |
|
122 | 159 |
|
123 | 160 | // r10 - sw=w; hw=r; // Storage element |
124 | 161 | cpuif.assert_read('h9, 0); |
125 | | - assert(cb.hwif_out.r10.f.value == 100); |
| 162 | + assert(cb.hwif_out.r10.f1.value == 100); |
| 163 | + assert(cb.hwif_out.r10.f2.value == 0); |
126 | 164 |
|
127 | | - cpuif.write('h9, 101); |
| 165 | + cpuif.write('h9, 101 + (1 << 7)); |
128 | 166 | cpuif.assert_read('h9, 0); |
129 | | - assert(cb.hwif_out.r10.f.value == 101); |
| 167 | + assert(cb.hwif_out.r10.f1.value == 101); |
| 168 | + assert(cb.hwif_out.r10.f2.value == 1); |
130 | 169 |
|
131 | 170 | {% endblock %} |
0 commit comments