Skip to content

Commit ffd795c

Browse files
committed
add missing lines
1 parent 2796c18 commit ffd795c

File tree

8 files changed

+59
-8
lines changed

8 files changed

+59
-8
lines changed

G24_Deliverable2/cache.vhd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ begin
7676
s_readdata <= c(index)(127 downto 0) ((offset * 32) -1 downto 32*(offset-1));
7777
s_waitrequest <= '0';
7878
state <= idle;
79-
else --If it is a miss
80-
state <= mm_read; --read data from main memory
8179
end if;
80+
else --If it is a miss
81+
state <= mm_read; --read data from main memory
8282
end if;
8383
else --Continue reading
8484
state <= c_read;
@@ -128,11 +128,12 @@ begin
128128
when mm_wait =>
129129
if word < 4 and m_waitrequest = '0' then
130130
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;
132131
m_read <= '0';
133132
if word = 3 then
133+
word := word + 1;
134134
state <= mm_wait;
135135
else
136+
word := word + 1;
136137
state <= mm_read;
137138
end if;
138139
elsif word = 4 then
@@ -142,6 +143,7 @@ begin
142143
s_readdata <= c(index)(127 downto 0)((offset * 32) - 1 downto 32 * (offset - 1)); --return data from given address of cache
143144
c(index)(152 downto 128) <= s_addr(31 downto 7); --Set tag of cache to given tag
144145
word := 0; --reset counter
146+
s_waitrequest <= '0';
145147
state <= idle; --operation ends switch to idle
146148
else
147149
state <= mm_wait; --wait until main memory is available

G24_Deliverable2/cache.vhd.bak

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ begin
7676
s_readdata <= c(index)(127 downto 0) ((offset * 32) -1 downto 32*(offset-1));
7777
s_waitrequest <= '0';
7878
state <= idle;
79-
else --If it is a miss
80-
state <= mm_read; --read data from main memory
8179
end if;
80+
else --If it is a miss
81+
state <= mm_read; --read data from main memory
8282
end if;
8383
else --Continue reading
8484
state <= c_read;
@@ -128,11 +128,12 @@ begin
128128
when mm_wait =>
129129
if word < 4 and m_waitrequest = '0' then
130130
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;
132131
m_read <= '0';
133132
if word = 3 then
133+
word := word + 1;
134134
state <= mm_wait;
135135
else
136+
word := word + 1;
136137
state <= mm_read;
137138
end if;
138139
elsif word = 4 then
@@ -166,7 +167,7 @@ begin
166167
m_read <= '0';
167168
m_writedata <= c(index)(127 downto 0)((word * 8) + 7 + 32*(offset - 1) downto (word*8) + 32*(offset - 1)); --Write data to main memory
168169
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
170171
else --wait until main memory is ready for receving request
171172
m_write <= '0';
172173
state <= writeback;

G24_Deliverable2/work/_info

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,54 @@
11
m255
22
K4
33
z2
4+
!s11e vcom 2020.1 2020.02, Feb 28 2020
45
13
56
!s112 1.1
67
!i10d 8192
78
!i10e 25
89
!i10f 100
910
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

G24_Deliverable2/work/_lib.qdb

0 Bytes
Binary file not shown.

G24_Deliverable2/work/_lib1_0.qdb

0 Bytes
Binary file not shown.

G24_Deliverable2/work/_lib1_0.qpg

24 KB
Binary file not shown.

G24_Deliverable2/work/_lib1_0.qtl

14.3 KB
Binary file not shown.

G24_Deliverable2/work/_vmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
m255
2+
K4
3+
z0
4+
cModel Technology

0 commit comments

Comments
 (0)