Esempio n. 1
0
        public override string GetStringStartValue()
        {
            StringBuilder res = new StringBuilder();

            res.Append("\"");
            for (int i = CurrentValue.Length - 1; i >= 0; i--)
            {
                res.Append(DataConvertorUtils.BoolToInt(CurrentValue[i]));
            }
            res.Append("\"");
            return(res.ToString());
        }
Esempio n. 2
0
        public override StringBuilder StringVhdlRealization(KeyValuePair <string, TimeInterval> param)
        {
            StringBuilder res = new StringBuilder();

            if (dutyCycle == 50)
            {
                res.Append(param.Key).Append("<=not ").Append(param.Key).Append(" after ").Append((ulong)timeStep.GetTimeUnitInFS() / 2).Append(" ").Append(TimeUnit.fs).Append(" when now < END_TIME;");
            }
            else
            {
                res.Append("process is").Append("\n").Append("begin").Append("\n").Append(" if now<END_TIME then").Append("\n").Append(param.Key).Append("<=").Append("\'").Append(DataConvertorUtils.BoolToInt(startValue)).Append("\';").Append("\n");
                res.Append(" wait for ").Append((ulong)(timeStep.GetTimeUnitInFS() * (dutyCycle / 100))).Append(" ").Append(TimeUnit.fs).Append(" ;").Append("\n");
                res.Append(param.Key).Append("<=").Append("\'").Append(DataConvertorUtils.BoolToInt(!startValue)).Append("\';").Append("\n");
                res.Append(" wait for ").Append((ulong)(timeStep.GetTimeUnitInFS() * (1 - dutyCycle / 100))).Append(" ").Append(TimeUnit.fs).Append(" ;").Append("\n");
                res.Append(" else wait;").Append("\n").Append(" end if;").Append("\n").Append("end process; ").Append("\n");
            }
            return(res);
        }
Esempio n. 3
0
 public override string GetStringStartValue()
 {
     return("\'" + DataConvertorUtils.BoolToInt(startValue) + "\'");
 }