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

Subversion Repositories sdhc-sc-core

[/] [sdhc-sc-core/] [trunk/] [grpSdVerification/] [unitSdCardModel/] [src/] [SdCardModel.sv] - Diff between revs 54 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 54 Rev 56
Line 96... Line 96...
        protected aCrc crc;
        protected aCrc crc;
        protected logic endbit;
        protected logic endbit;
 
 
        function automatic void calcCrc();
        function automatic void calcCrc();
                logic[39:0] temp;
                logic[39:0] temp;
 
                crc = 0;
 
 
                temp[39] = startbit;
                temp[39] = startbit;
                temp[38] = transbit;
                temp[38] = transbit;
                temp[37:32] = id;
                temp[37:32] = id;
                temp[31:0] = arg;
                temp[31:0] = arg;
Line 130... Line 131...
                for (int i = 31; i>= 0; i--) begin
                for (int i = 31; i>= 0; i--) begin
                        @ICmd.cb;
                        @ICmd.cb;
                        ICmd.cb.Cmd <= arg[i];
                        ICmd.cb.Cmd <= arg[i];
                end
                end
 
 
                for (int i = 5; i >= 0; i--) begin
                for (int i = 6; i >= 0; i--) begin
                        @ICmd.cb;
                        @ICmd.cb;
                        ICmd.cb.Cmd <= crc[i];
                        ICmd.cb.Cmd <= crc[i];
                end
                end
 
 
                @ICmd.cb;
                @ICmd.cb;

powered by: WebSVN 2.1.0

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