Line 135... |
Line 135... |
signal found, free, elim, del: myint;
|
signal found, free, elim, del: myint;
|
signal stateIO: IOType;
|
signal stateIO: IOType;
|
signal statetag: tType;
|
signal statetag: tType;
|
signal stateram: rType;
|
signal stateram: rType;
|
signal statequeue: fType;
|
signal statequeue: fType;
|
signal enableram, enablequeue, queuedone, readsh, writesh, doneh, preempted, isfull, flag,
|
signal enableram, enablequeue, queuedone, readsh, writesh, doneh, preempted, isfull, flag, flag1,
|
interrupt, readb, writeb, writec, writet, accdone, accqueue, accinterrupt, serviced, oldint: std_ulogic;
|
interrupt, readb, writeb, writec, writet, accdone, accqueue, accinterrupt, serviced, oldint: std_ulogic;
|
signal gal: std_ulogic_vector( 7 downto 0);
|
signal gal: std_ulogic_vector( 7 downto 0);
|
|
|
begin
|
begin
|
|
|
Line 356... |
Line 356... |
doneh <= '0';
|
doneh <= '0';
|
accinterrupt <= '0';
|
accinterrupt <= '0';
|
accqueue <= '0';
|
accqueue <= '0';
|
isfull <= '0';
|
isfull <= '0';
|
flag <= '0';
|
flag <= '0';
|
|
flag1 <= '1';
|
initcount1 <= ( others => '0');
|
initcount1 <= ( others => '0');
|
FreeIn <= ( others => '0');
|
FreeIn <= ( others => '0');
|
firstf <= ( others => '0');
|
firstf <= ( others => '0');
|
lastf <= ( others => '0');
|
lastf <= ( others => '0');
|
counterf <= ( others => '0');
|
counterf <= ( others => '0');
|
Line 389... |
Line 390... |
if enableram = '1' then -- UPDATE
|
if enableram = '1' then -- UPDATE
|
if isfull = '0' then
|
if isfull = '0' then
|
tagBuff <= tagRAMOut;
|
tagBuff <= tagRAMOut;
|
end if;
|
end if;
|
if found /= 15 then
|
if found /= 15 then
|
|
tagBuff <= tagRAMOut;
|
cindex <= tagRAMOut( found).cacheAddr;
|
cindex <= tagRAMOut( found).cacheAddr;
|
isfull <= '0';
|
isfull <= '0';
|
stateram <= ramupdate;
|
stateram <= ramupdate;
|
elsif free /= 15 then
|
elsif free /= 15 then
|
en := '1';
|
en := '1';
|
if emptyf = '1' and isfull = '0' then
|
if emptyf = '1' and isfull = '0' then
|
isfull <= '1';
|
isfull <= '1';
|
|
tagBuff <= tagRAMOut;
|
stateram <= ramwait;
|
stateram <= ramwait;
|
else
|
else
|
cindex <= FreeOut;
|
cindex <= FreeOut;
|
if isfull = '1' then
|
if isfull = '1' then
|
tagBuff( free).cacheAddr <= FreeOut;
|
tagBuff( free).cacheAddr <= FreeOut;
|
Line 409... |
Line 412... |
else
|
else
|
tagRAMOut( free).cacheAddr <= FreeOut;
|
tagRAMOut( free).cacheAddr <= FreeOut;
|
tagRAMOut( free).cacheValid <= '1';
|
tagRAMOut( free).cacheValid <= '1';
|
tagRAMOut( free).tag <= AddressInh( tagRAMOut( free).tag'range);
|
tagRAMOut( free).tag <= AddressInh( tagRAMOut( free).tag'range);
|
tagRAMOut( free).tagValid <= '1';
|
tagRAMOut( free).tagValid <= '1';
|
|
flag1 <= '1';
|
end if;
|
end if;
|
isfull <= '0';
|
isfull <= '0';
|
getf <= '1';
|
getf <= '1';
|
if IOCodeh = "111" and ldCachedWords = 0 then
|
if IOCodeh = "111" and ldCachedWords = 0 then
|
stateram <= ramupdate2;
|
stateram <= ramupdate2;
|
Line 463... |
Line 467... |
stateram <= ramclean;
|
stateram <= ramclean;
|
end if;
|
end if;
|
when ramread =>
|
when ramread =>
|
readb <= '0';
|
readb <= '0';
|
getf <= '0';
|
getf <= '0';
|
|
if flag1 = '1' then
|
|
tagBuff <= tagRAMOut;
|
|
flag1 <= '0';
|
|
end if;
|
stateram <= ramread1;
|
stateram <= ramread1;
|
when ramread1 =>
|
when ramread1 =>
|
if readsh = '0' then
|
if readsh = '0' then
|
for i in blockIn'range loop
|
for i in blockIn'range loop
|
cacheIn.Words( i) <= blockIn( i);
|
cacheIn.Words( i) <= blockIn( i);
|
end loop;
|
end loop;
|
stateram <= ramupdate2;
|
stateram <= ramupdate2;
|
end if;
|
end if;
|
when ramupdate2 =>
|
when ramupdate2 =>
|
|
if flag1 = '1' then
|
|
tagBuff <= tagRAMOut;
|
|
flag1 <= '0';
|
|
end if;
|
if IOCodeh(2) = '1' then
|
if IOCodeh(2) = '1' then
|
if IOCodeh(1) = '1' then
|
if IOCodeh(1) = '1' then
|
If IOCodeh(0) = '1' then
|
If IOCodeh(0) = '1' then
|
cacheIn.Words( index).Word <= DataInh;
|
cacheIn.Words( index).Word <= DataInh;
|
cacheIn.Words( index).Modified <= "1111";
|
cacheIn.Words( index).Modified <= "1111";
|