OpenCores
URL https://opencores.org/ocsvn/ht_tunnel/ht_tunnel/trunk

Subversion Repositories ht_tunnel

[/] [ht_tunnel/] [trunk/] [bench/] [core/] [ResponsePacket.cpp] - Diff between revs 2 and 7

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

Rev 2 Rev 7
Line 51... Line 51...
        bv.range(5,0) = command;
        bv.range(5,0) = command;
        bv.range(12,8) = unitID;
        bv.range(12,8) = unitID;
        bv.range(20,16) = srcTag;
        bv.range(20,16) = srcTag;
        bv.range(31,30) = rqUID;
        bv.range(31,30) = rqUID;
 
 
        //Error 0 => bv[20]
        //Error 0 => bv[21]
        //Error 1 => bv[28]
        //Error 1 => bv[29]
 
 
        if(error == RE_NORMAL || error == RE_DATA_ERROR)
        if(error == RE_NORMAL || error == RE_DATA_ERROR)
                bv[20] = false;
                bv[21] = false;
        else
        else
                bv[20] = true;
                bv[21] = true;
 
 
        if(error == RE_NORMAL || error == RE_TARGET_ABORT)
        if(error == RE_NORMAL || error == RE_TARGET_ABORT)
                bv[28] = false;
                bv[29] = false;
        else
        else
                bv[28] = true;
                bv[29] = true;
 
 
        bv[14] = bridge;
        bv[14] = bridge;
        bv[15] = passPW;
        bv[15] = passPW;
        bv[7] = isoc;
        bv[7] = isoc;
}
}
Line 81... Line 81...
        sc_bv<4> temp = bv.range(25,22);
        sc_bv<4> temp = bv.range(25,22);
        return temp;
        return temp;
}
}
 
 
ResponseError ResponsePacket::getResponseError() const{
ResponseError ResponsePacket::getResponseError() const{
        if(bv[20] == false){
        if(bv[21] == false){
                if(bv[28] == false) return RE_NORMAL;
                if(bv[29] == false) return RE_NORMAL;
                return RE_DATA_ERROR;
                return RE_DATA_ERROR;
        }
        }
        else{
        else{
                if(bv[28] == false) return RE_TARGET_ABORT;
                if(bv[29] == false) return RE_TARGET_ABORT;
                return RE_MASTER_ABORT;
                return RE_MASTER_ABORT;
        }
        }
}
}
 
 
/**
/**

powered by: WebSVN 2.1.0

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