Пример #1
0
        public static void Run()
        {
            DesignContext.Reset();
            Mod2TestDesign td = new Mod2TestDesign(3, 10, 2);
            DesignContext.Instance.Elaborate();
            DesignContext.Instance.Simulate(new Time(1.0, ETimeUnit.us));

            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(@".\hdl_out_ALUTestDesign", "ALUTestDesign");
            project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
            project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
            project.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
            project.SetVHDLProfile();

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(codeGen);
            project.Save();
        }
Пример #2
0
        public static void RunTest()
        {
            DesignContext.Reset();
            var tb = new FileWriterTestbench();
            DesignContext.Instance.Elaborate();

            DesignContext.Instance.Simulate(new Time(0.5, ETimeUnit.us));

            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(@".\hdl_out_WriteFile", "FileWriterDesign");
            project.ISEVersion = EISEVersion._13_2;
            project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
            project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
            project.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
            project.SetVHDLProfile();

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(codeGen);
            project.Save();
        }
Пример #3
0
        public static void RunTest()
        {
            DesignContext.Reset();

            TestHLS_FPU_Testbench tb = new TestHLS_FPU_Testbench();

            DesignContext.Instance.Elaborate();
            DesignContext.Instance.Simulate(new Time(3.0, ETimeUnit.us));
            DesignContext.Stop();
            XilinxIntegration.RegisterIPCores(DesignContext.Instance.Descriptor);
            DesignContext.Instance.CompleteAnalysis();

            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(@".\hdl_out_TestHLS_FPU", "TestHLS_FPU");
            project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Virtex6);
            project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc6vlx240t);
            project.PutProperty(EXilinxProjectProperties.Package, EPackage.ff1156);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._2);
            project.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);
            project.SetVHDLProfile();

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(tb, codeGen);
            project.Save();
            var eng = SynthesisEngine.Create(
                DesignContext.Instance, new DocumentationProject(@".\hdl_out_TestHLS_FPU\doc"));
        }
Пример #4
0
        public static void RunTest()
        {
            DesignContext.Reset();
            Testbench tb = new Testbench();
            DesignContext.Instance.Elaborate();
            DesignContext.Instance.Simulate(101 * Testbench.ClockPeriod);
            DesignContext.Instance.CompleteAnalysis();

            VHDLGenerator codeGen = new VHDLGenerator();
            DocumentationProject proj = new DocumentationProject("./doc");
            SynthesisEngine.Create(DesignContext.Instance, proj).Synthesize(codeGen);
            proj.Save();
        }
Пример #5
0
        public static void RunTest()
        {
            DesignContext.Reset();

            TestHLS_PortAccess_Testbench tb = new TestHLS_PortAccess_Testbench();

            DesignContext.Instance.Elaborate();
            DesignContext.Instance.Simulate(new Time(1.0, ETimeUnit.us));
            DesignContext.Stop();
            DesignContext.Instance.CompleteAnalysis();

            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(@".\hdl_out_TestHLS_PortAccess", "TestHLS_PortAccess");
            project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Virtex6);
            project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc6vlx240t);
            project.PutProperty(EXilinxProjectProperties.Package, EPackage.ff1156);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._2);
            project.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);
            project.SetVHDLProfile();
            project.SkipIPCoreSynthesis = true;

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(tb, codeGen);
            project.Save();
        }
Пример #6
0
            static void Main(string[] args)
            {
                ///default values
                int cycles = 100;

                ///elaborate
                SimpleCounterTestbench tb = new SimpleCounterTestbench();
                DesignContext.Instance.Elaborate();

                ///print out config
                Console.WriteLine("#cycles: " + cycles);

                ///simulate
                DesignContext.Instance.Simulate(cycles * SimpleCounterTestbench.ClockPeriod);

                ///notify completion
                Console.WriteLine("Done.  [ #cycles = " + cycles + " ]");


#if RUNANALYSIS
            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(@".\hdl_output", "SimpleCounter");
            project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
            project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
            project.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
            project.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(codeGen);
            project.Save();

            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project_SC = new XilinxProject(@".\SystemC_output", "SimpleCounter");
            project_SC.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
            project_SC.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
            project_SC.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
            project_SC.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
            project_SC.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);

            SystemCGenerator codeGen_SC = new SystemCGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project_SC).Synthesize(codeGen_SC);
            project_SC.Save();
#endif
            }
Пример #7
0
            static void Main(string[] args)
            {
                Tesbernch_Multiplier tb = new Tesbernch_Multiplier();
                DesignContext.Instance.Elaborate();
                DesignContext.Instance.Simulate(100 * Tesbernch_Multiplier.ClockPeriod);
                //DesignContext.Instance.Simulate(10 * (testbench_XilinxMultiplier_.DataWidth + 3) * testbench_XilinxMultiplier_.ClockPeriod);

                // Now convert the design to VHDL and embed it into a Xilinx ISE project
                XilinxProject project = new XilinxProject(@".\hdl_output", "XilinxMultiplier");
                project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
                project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
                project.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
                project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
                project.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);

                VHDLGenerator codeGen = new VHDLGenerator();
                SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(codeGen);
                project.Save();
            }
Пример #8
0
 public VHDLStatementsGen(IndentedTextWriter tw, VHDLGenerator vhdg)
 {
     _tw = tw;
     _vhdg = vhdg;
 }
Пример #9
0
 public LiteralStringifier(VHDLGenerator vhdg, LiteralReference.EMode mode)
 {
     _vhdg = vhdg;
     Mode = mode;
 }
Пример #10
0
        public static void RunTest()
        {
            DesignContext.Reset();

            TestDesign1 td1 = new TestDesign1(3, 4);
            FixedPointSettings.GlobalOverflowMode = EOverflowMode.Wrap;
            DesignContext.Instance.Elaborate();
            DesignContext.Instance.Simulate(20 * TestDesign1.ClockPeriod);

            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(@".\hdl_TestDesign1", "TestDesign1");
            project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
            project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
            project.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
            project.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(codeGen); ;
            project.Save();

            DesignContext.Reset();
        }
Пример #11
0
            public static void Run()
            {
                Testbench tb = new Testbench();
                DesignContext.Instance.Elaborate();
                
                ///remember start time
                Start = System.DateTime.Now.Ticks;

                DesignContext.Instance.Simulate(Cycles * Testbench.ClockCycle);

#if RUNANALYSIS
                // Now convert the design to VHDL and embed it into a Xilinx ISE project
                XilinxProject project = new XilinxProject(@".\hdl_output", "Arbiter");
                project.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
                project.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
                project.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
                project.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
                project.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);

                VHDLGenerator codeGen = new VHDLGenerator();
                SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(codeGen);
                project.Save();

                // Now convert the design to VHDL and embed it into a Xilinx ISE project
                XilinxProject project_SC = new XilinxProject(@".\SystemC_output", "SimpleCounter");
                project_SC.PutProperty(EXilinxProjectProperties.DeviceFamily, EDeviceFamily.Spartan3);
                project_SC.PutProperty(EXilinxProjectProperties.Device, EDevice.xc3s1500l);
                project_SC.PutProperty(EXilinxProjectProperties.Package, EPackage.fg676);
                project_SC.PutProperty(EXilinxProjectProperties.SpeedGrade, ESpeedGrade._4);
                project_SC.PutProperty(EXilinxProjectProperties.PreferredLanguage, EHDL.VHDL);

                SystemCGenerator codeGen_SC = new SystemCGenerator();
                SynthesisEngine.Create(DesignContext.Instance, project_SC).Synthesize(codeGen_SC);
                project_SC.Save();
#endif
            }
        /// <summary>
        /// Synthesizes the design.
        /// </summary>
        /// <param name="destPath">target path which will contain the generated files</param>
        /// <param name="designName">name of the design</param>
        /// <param name="info">ISE information</param>
        /// <param name="twinProject">optional twin project</param>
        /// <param name="step">what stages of the overall flow to execute</param>
        /// <returns>the generated ISE project</returns>
        public XilinxProject Synthesize(string destPath, string designName, ISEInfo info,
            IProject twinProject = null, EFlowStep step = EFlowStep.HDLGenAndIPCores)
        {
            // Now convert the design to VHDL and embed it into a Xilinx ISE project
            XilinxProject project = new XilinxProject(destPath, designName)
            {
                TwinProject = twinProject
            };

            project.ISEVersion = info.VersionTag;
            if (info.Path == null)
                project.SkipIPCoreSynthesis = true;
            else
                project.ISEBinPath = info.Path;

            project.PutProperty(EXilinxProjectProperties.DeviceFamily, Device.GetFamily());
            project.PutProperty(EXilinxProjectProperties.Device, Device);
            project.PutProperty(EXilinxProjectProperties.Package, Package);
            project.PutProperty(EXilinxProjectProperties.SpeedGrade, SpeedGrade);
            project.SetVHDLProfile();
            if (!step.HasFlag(EFlowStep.IPCores))
                project.SkipIPCoreSynthesis = true;
            project.TopLevelComponent = TopLevelComponent.Descriptor;
            CreateUCF(project);

            VHDLGenerator codeGen = new VHDLGenerator();
            SynthesisEngine.Create(DesignContext.Instance, project).Synthesize(GetComponentSet(), codeGen);
            project.Save();
            if (step.HasFlag(EFlowStep.XST) ||
                step.HasFlag(EFlowStep.NGDBuild) ||
                step.HasFlag(EFlowStep.Map) ||
                step.HasFlag(EFlowStep.PAR) ||
                step.HasFlag(EFlowStep.TRCE))
            {
                var flow = project.ConfigureFlow(TopLevelComponent);
                flow.Start(step);
            }
            return project;
        }