OpenCores
URL https://opencores.org/ocsvn/sdhc-sc-core/sdhc-sc-core/trunk

Subversion Repositories sdhc-sc-core

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /sdhc-sc-core/trunk/src/grpSd/unitSdController
    from Rev 103 to Rev 104
    Reverse comparison

Rev 103 → Rev 104

/src/SdController-Rtl-a.vhdl
383,21 → 383,20
end if;
 
when CheckSpeed =>
oLedBank(4) <= cActivated;
NextR.ToSdData.DataMode <= widewidth;
NextR.ToSdData.DataMode <= widewidth;
NextR.ToSdData.ExpectBits <= SwitchFunctionBits;
 
case R.Region is
when send =>
NextR.ToSdCmd.Content.id <= cSdCmdSwitchFunction;
NextR.ToSdCmd.Content.id <= cSdCmdSwitchFunction;
NextR.ToSdCmd.Content.arg <= cSdCmdCheckSpeedSupport;
NextRegion := response;
NextRegion := response;
 
when response =>
if (iSdCmd.Valid = cActivated) then
if (iSdCmd.Content.id = cSdCmdSwitchFunction) then
NextR.CardStatus <= iSdCmd.Content.arg;
NextR.Region <= receivedata;
NextR.Region <= receivedata;
else
NextR.State <= invalidCard;
416,7 → 415,6
if (iSdData.DataBlock(cSdHighSpeedFunctionSupportBit) = cActivated and
iSdData.DataBlock(cSdHighSpeedFunctionGroupLow+3 downto cSdHighSpeedFunctionGroupLow) = X"1") then
NextCmdRegion := ChangeSpeed;
NextRegion := idle;
 
else
NextState := idle;
425,12 → 423,53
 
 
when others =>
report "Unhandled region";
report "Unhandled region" severity error;
end case;
 
when ChangeSpeed =>
oLedBank(1) <= cActivated;
case R.Region is
when send =>
NextR.ToSdCmd.Content.id <= cSdCmdSwitchFunction;
NextR.ToSdCmd.Content.arg <= cSdCmdSwitchSpeed;
NextRegion := response;
 
when response =>
if (iSdCmd.Valid = cActivated) then
if (iSdCmd.Content.id = cSdCmdSwitchFunction) then
NextR.CardStatus <= iSdCmd.Content.arg;
NextR.Region <= receivedata;
else
NextR.State <= invalidCard;
end if;
elsif (Timeout = cActivated) then
NextR.State <= invalidCard;
end if;
 
when receivedata =>
null;
when waitstatedata =>
NextRegion := send;
 
if (NextCmdTimeout = cActivated) then
if (iSdData.DataBlock(cSdHighSpeedFunctionSupportBit) = cActivated and
iSdData.DataBlock(cSdHighSpeedFunctionGroupLow+3 downto cSdHighSpeedFunctionGroupLow) = X"1") then
NextState := idle;
NextRegion := idle;
 
else
NextState := invalidCard;
end if;
end if;
 
 
when others =>
report "Unhandled region" severity error;
end case;
 
when others =>
report "Unhandled CmdRegion" severity error;
end case;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.