/// <summary> /// Input connections to device /// </summary> /// <param name="bankID">BankID of the device</param> /// <param name="cycle">Zero-based program cycle number</param> /// <returns></returns> private static List <Connection> Connections(Bank bankID, int cycle) { var conns = new List <Connection>(); DevicePort mux0PortOut = DevicePort.Mux_0; DevicePort shifterPortOut = DevicePort.Shifter; DevicePort mux1Mux0PortIn = DevicePort.Default; DevicePort mux1ShifterPortIn = DevicePort.Default; PortStatus mux0PortOut_Stat; PortStatus shifterPortOut_Stat; PortStatus mux1Mux0PortIn_Stat; PortStatus mux1ShifterPortIn_Stat; InputsUsed(bankID, cycle, out mux0PortOut_Stat, out shifterPortOut_Stat, out mux1Mux0PortIn_Stat, out mux1ShifterPortIn_Stat); var mux0_label = Mux0Model.OutputCalc(cycle).FormattedValue; var shifter_label = ShifterModel.OutputCalc(cycle).FormattedValue; switch (bankID) { case Bank.Bank_A: mux1Mux0PortIn = DevicePort.Mux_1A; mux1ShifterPortIn = DevicePort.Mux_1A; break; case Bank.Bank_B: mux1Mux0PortIn = DevicePort.Mux_1B; mux1ShifterPortIn = DevicePort.Mux_1B; break; } conns.Add(new Connection( BusType.Data, mux0PortOut, mux0PortOut_Stat, mux0_label, null, mux1Mux0PortIn, mux1Mux0PortIn_Stat)); conns.Add(new Connection( BusType.Data, shifterPortOut, shifterPortOut_Stat, shifter_label, null, mux1ShifterPortIn, mux1ShifterPortIn_Stat)); return(conns); }
/// <summary> /// Input connections to device /// </summary> /// <param name="cycle">Zero-based program cycle number</param> /// <returns></returns> private static List <Connection> Connections(int cycle) { var conns = new List <Connection>(); var instr = ActiveInstr(cycle - PIPELINE_DELAY); PortStatus mux2APortOut_Stat; PortStatus mux2BPortOut_Stat; PortStatus shifterPortOut_Stat; PortStatus macMux2APortIn_Stat; PortStatus macMux2BPortIn_Stat; PortStatus macShifterPortIn_Stat; InputsUsed(cycle, out mux2APortOut_Stat, out mux2BPortOut_Stat, out shifterPortOut_Stat, out macMux2APortIn_Stat, out macMux2BPortIn_Stat, out macShifterPortIn_Stat); var activeLabel_Mux_2A = Mux2Model.OutputCalc(Bank.Bank_A, cycle).FormattedValue; var activeLabel_Mux_2B = Mux2Model.OutputCalc(Bank.Bank_B, cycle).FormattedValue; var activeLabel_Shifter = ShifterModel.OutputCalc(cycle).FormattedValue; // Show inputs based on connection: conns.Add(new Connection( BusType.Data, DevicePort.Mux_2A, mux2APortOut_Stat, activeLabel_Mux_2A, null, DevicePort.MAC, macMux2APortIn_Stat)); conns.Add(new Connection( BusType.Data, DevicePort.Mux_2B, mux2BPortOut_Stat, activeLabel_Mux_2B, null, DevicePort.MAC, macMux2BPortIn_Stat)); conns.Add(new Connection( BusType.Data, DevicePort.Shifter, shifterPortOut_Stat, activeLabel_Shifter, null, DevicePort.MAC, macShifterPortIn_Stat)); return(conns); }
/// <summary> /// Input connections to device /// </summary> /// <param name="bankID">BankID of the device</param> /// <param name="cycle">Zero-based program cycle number</param> /// <returns></returns> private static List <Connection> Connections(Bank bankID, int cycle) { var conns = new List <Connection>(); var lbl_Shifter_Out = ShifterModel.OutputCalc(cycle).FormattedValue; PortStatus statHold_A; PortStatus statHold_B; InputsUsed(cycle, out statHold_A, out statHold_B); switch (bankID) { case Bank.Bank_A: conns.Add(new Connection( BusType.Data, DevicePort.Shifter, statHold_A, lbl_Shifter_Out, null, DevicePort.Hold_A, statHold_A)); break; case Bank.Bank_B: conns.Add(new Connection( BusType.Data, DevicePort.Shifter, statHold_B, lbl_Shifter_Out, null, DevicePort.Hold_B, statHold_B)); break; } return(conns); }