private void Processing() { if (CLK.RisingEdge()) { phase = phase + GetPinc(); phase2 = phase2 + GetOffset();// hier ist das Problem, die Getpinc() incrementiert sich nicht nur die Getoffset() phase4 = phase + phase2; //phase5 = Getpipe(phase4); //phase6 = GetPhaseIn(); } switch (Partspresent) { case EConfigurationOptions.PhaseGeneratorAndSinCosLut: { PHASE_OUT.Next = phase4; SINE.Next = GetSinus(Getradian(phase4)); COSINE.Next = GetCosinus(Getradian(phase4)); } break; case EConfigurationOptions.PhaseGeneratorOnly: { PHASE_OUT.Next = phase2; } break; case EConfigurationOptions.SinAndCosOnly: { PHASE_OUT.Next = Getpipe(GetPhaseIn()); SINE.Next = GetSinus(Getradian(Getpipe(GetPhaseIn()))); COSINE.Next = GetCosinus(Getradian(Getpipe(GetPhaseIn()))); //PHASE_OUT1 = GetPhaseIn(); } break; } }
public static void Main() { var clk = new CLK { }; var synchThread = new Thread(clk.synch); var showThread = new Thread(clk.show); synchThread.Start(); showThread.Start(); }
private void Processing() { if (CLK.RisingEdge()) { Signed tmp = DIVISOR.Cur.SignedValue.Resize(DividendAndQuotientWidth + FractionWidth) / DIVIDEND.Cur.SignedValue; _quotient.Next = tmp.SLVValue[DividendAndQuotientWidth + FractionWidth - 1, FractionWidth]; if (FractionWidth > 0) { _remainder.Next = tmp.SLVValue[FractionWidth - 1, 0]; } } }
private void Processing() { if (Latency == 0 || (CLK.RisingEdge() && (!HasCE || CE.Cur == '1'))) { int width = Math.Max(Awidth, Bwidth); if (AddMode == EAddMode.Add || (AddMode == EAddMode.AddSubtract && ADD.Cur == '1')) { _result.Next = (A.Cur.UnsignedValue.Resize(width) + B.Cur.UnsignedValue.Resize(width)).Resize(OutWidth).SLVValue; } else { _result.Next = (A.Cur.UnsignedValue.Resize(width) - B.Cur.UnsignedValue.Resize(width)).Resize(OutWidth).SLVValue; } } }