Exemple #1
0
        public virtual void Write32(int offset, uint value)
        {
            if ((offset & 0x3) != 0)
            {
                throw new Exception("BAD_OFFSET");
            }

            uint config = (((uint)offset & 0xfc) |
                           ((uint)identifier << 8) |
                           ((uint)1 << 31));

            addressPort.Write32(config);
            dataPort.Write32(value);
        }
Exemple #2
0
        public virtual uint Read32(int offset)
        {
            if ((offset & 0x3) != 0)
            {
                throw new Exception("BAD_OFFSET");
            }

            uint config = (((uint)offset & 0xfc) |
                           ((uint)identifier << 8) |
                           ((uint)1 << 31));

            addressPort.Write32(config);
            return(dataPort.Read32());
        }