File tree 8 files changed +59
-8
lines changed
8 files changed +59
-8
lines changed Original file line number Diff line number Diff line change 76
76
s_readdata <= c(index)(127 downto 0 ) ((offset * 32 ) - 1 downto 32 * (offset- 1 ));
77
77
s_waitrequest <= '0' ;
78
78
state <= idle;
79
- else -- If it is a miss
80
- state <= mm_read; -- read data from main memory
81
79
end if ;
80
+ else -- If it is a miss
81
+ state <= mm_read; -- read data from main memory
82
82
end if ;
83
83
else -- Continue reading
84
84
state <= c_read;
@@ -128,11 +128,12 @@ begin
128
128
when mm_wait =>
129
129
if word < 4 and m_waitrequest = '0' then
130
130
c(index)(127 downto 0 )((word * 8 ) + 7 + 32 * (offset - 1 ) downto (word* 8 ) + 32 * (offset - 1 )) <= m_readdata; -- Write data to main memory
131
- word := word + 1 ;
132
131
m_read <= '0' ;
133
132
if word = 3 then
133
+ word := word + 1 ;
134
134
state <= mm_wait;
135
135
else
136
+ word := word + 1 ;
136
137
state <= mm_read;
137
138
end if ;
138
139
elsif word = 4 then
@@ -142,6 +143,7 @@ begin
142
143
s_readdata <= c(index)(127 downto 0 )((offset * 32 ) - 1 downto 32 * (offset - 1 )); -- return data from given address of cache
143
144
c(index)(152 downto 128 ) <= s_addr(31 downto 7 ); -- Set tag of cache to given tag
144
145
word := 0 ; -- reset counter
146
+ s_waitrequest <= '0' ;
145
147
state <= idle; -- operation ends switch to idle
146
148
else
147
149
state <= mm_wait; -- wait until main memory is available
Original file line number Diff line number Diff line change 76
76
s_readdata <= c(index)(127 downto 0) ((offset * 32) -1 downto 32*(offset-1));
77
77
s_waitrequest <= '0';
78
78
state <= idle;
79
- else --If it is a miss
80
- state <= mm_read; --read data from main memory
81
79
end if;
80
+ else --If it is a miss
81
+ state <= mm_read; --read data from main memory
82
82
end if;
83
83
else --Continue reading
84
84
state <= c_read;
@@ -128,11 +128,12 @@ begin
128
128
when mm_wait =>
129
129
if word < 4 and m_waitrequest = '0' then
130
130
c(index)(127 downto 0)((word * 8) + 7 + 32*(offset - 1) downto (word*8) + 32*(offset - 1)) <= m_readdata; --Write data to main memory
131
- word := word + 1;
132
131
m_read <= '0';
133
132
if word = 3 then
133
+ word := word + 1;
134
134
state <= mm_wait;
135
135
else
136
+ word := word + 1;
136
137
state <= mm_read;
137
138
end if;
138
139
elsif word = 4 then
@@ -166,7 +167,7 @@ begin
166
167
m_read <= '0';
167
168
m_writedata <= c(index)(127 downto 0)((word * 8) + 7 + 32*(offset - 1) downto (word*8) + 32*(offset - 1)); --Write data to main memory
168
169
word := word + 1; --increase counter since one more word is written into main memory
169
- state <= mm_write ; --stay in this state until word limit has reached
170
+ state <= writeback ; --stay in this state until word limit has reached
170
171
else --wait until main memory is ready for receving request
171
172
m_write <= '0';
172
173
state <= writeback;
Original file line number Diff line number Diff line change 1
1
m255
2
2
K4
3
3
z2
4
+ !s11e vcom 2020.1 2020.02, Feb 28 2020
4
5
13
5
6
!s112 1.1
6
7
!i10d 8192
7
8
!i10e 25
8
9
!i10f 100
9
10
cModel Technology
10
- dC:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2
11
+ Z0 dC:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2
12
+ Ecache
13
+ Z1 w1614336342
14
+ Z2 DPx4 ieee 11 numeric_std 0 22 aU^R8eGcicLcUFIaBQSL>3
15
+ Z3 DPx3 std 6 textio 0 22 zE1`LPoLg^DX3Oz^4Fj1K3
16
+ Z4 DPx4 ieee 14 std_logic_1164 0 22 cVAk:aDinOX8^VGI1ekP<3
17
+ !i122 0
18
+ R0
19
+ Z5 8C:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2/cache.vhd
20
+ Z6 FC:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2/cache.vhd
21
+ l0
22
+ L5 1
23
+ V>eIZ;=ob1;D=GYG?_<efE0
24
+ !s100 C<;HKM7M38>>4jE0Q0h@Q2
25
+ Z7 OV;C;2020.1;71
26
+ 32
27
+ Z8 !s110 1614337398
28
+ !i10b 1
29
+ Z9 !s108 1614337397.000000
30
+ Z10 !s90 -reportprogress|300|-work|work|C:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2/cache.vhd|
31
+ !s107 C:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2/cache.vhd|
32
+ !i113 1
33
+ Z11 o-work work
34
+ Z12 tExplicit 1 CvgOpt 0
35
+ Aarch
36
+ R2
37
+ R3
38
+ R4
39
+ DEx4 work 5 cache 0 22 >eIZ;=ob1;D=GYG?_<efE0
40
+ !i122 0
41
+ l39
42
+ L30 150
43
+ V5en?kI5jgLaW1><0X:^QB0
44
+ !s100 6cAzT9U32Rk2;FBJ0SZ_30
45
+ R7
46
+ 32
47
+ R8
48
+ !i10b 1
49
+ R9
50
+ R10
51
+ Z13 !s107 C:/Users/malki/Desktop/Ceng/Winter_2021/ECSE 425/Computer-Architecture/G24_Deliverable2/cache.vhd|
52
+ !i113 1
53
+ R11
54
+ R12
Original file line number Diff line number Diff line change
1
+ m255
2
+ K4
3
+ z0
4
+ cModel Technology
You can’t perform that action at this time.
0 commit comments