Exemplo n.º 1
0
 /// <summary>
 /// Constructor of a named joined PIC register.
 /// </summary>
 /// <param name="jsfr">The joined SFR definition.</param>
 /// <param name="number">The Reko index number of this register.</param>
 /// <param name="subregs">The sub-registers of the joint.</param>
 public PICRegisterStorage(IJoinedRegister jsfr, int number, IList <PICRegisterStorage> subregs)
     : base(jsfr.Name, number, 0, PrimitiveType.CreateWordFromBits(jsfr.BitWidth))
 {
     Traits       = new PICRegisterTraits(jsfr, subregs);
     AttachedRegs = subregs.ToList();
     AttachedRegs.ForEach(r => r.ParentRegister = this);
     ParentRegister = null;
     BitFields      = new SortedList <PICRegisterBitFieldSortKey, PICRegisterBitFieldStorage>();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor of a named PIC register.
 /// </summary>
 /// <param name="sfr">The SFR definition.</param>
 /// <param name="number">The Reko index number of this register.</param>
 public PICRegisterStorage(ISFRRegister sfr, int number)
     : this(sfr.Name, number, 0, PrimitiveType.CreateWordFromBits((uint)sfr.BitWidth), new PICRegisterTraits(sfr))
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Instantiates a new PIC register's bit-field.
 /// </summary>
 /// <param name="reg">The PIC register containing the bit field.</param>
 /// <param name="sfrfielddef">The bit field definition per PIC XML definition.</param>
 public PICRegisterBitFieldStorage(PICRegisterStorage reg, ISFRBitField sfrfielddef)
     : base(reg, (uint)(sfrfielddef.BitMask << sfrfielddef.BitPos), sfrfielddef.Name, PrimitiveType.CreateWordFromBits(sfrfielddef.BitWidth))
 {
     SFRField        = sfrfielddef;
     BitFieldSortKey = new PICRegisterBitFieldSortKey(sfrfielddef.BitPos, (byte)sfrfielddef.BitWidth);
 }