Beispiel #1
0
        public void WriteActionBus(string acction, string tag, string coreName)
        {
            int position            = Convert.ToInt32(tag, 2) % 2;
            CacheActionRequest temp = new CacheActionRequest()
            {
                Acction  = acction,
                Position = position,
                Tag      = tag,
                CoreName = coreName
            };

            actionQueue.Enqueue(temp);
        }
Beispiel #2
0
        private void WriteAcctionBusAux()
        {
            while (threadFlag.Flag)
            {
                //Operate only when Clock is True Simulate Clock Signals
                if (!bussy && actionQueue.Count > 0)
                {
                    clock.CLOCK_CCAction = false;
                    CacheActionRequest temp = (CacheActionRequest)actionQueue.Dequeue();
                    acction  = temp.Acction;
                    tag      = temp.Tag;
                    position = temp.Position;
                    bussy    = true;
                    switch (temp.CoreName)
                    {
                    case Constants.CORE_ZERO_ID:
                        coreZeroRead = true;
                        break;

                    case Constants.CORE_ONE_ID:
                        coreOneRead = true;
                        break;

                    case Constants.CORE_TWO_ID:
                        coreTwoRead = true;
                        break;

                    case Constants.CORE_THREE_ID:
                        coreThreeRead = true;
                        break;

                    default:
                        break;
                    }
                    ;
                }
            }
        }