Ejemplo n.º 1
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();
            }
Ejemplo n.º 2
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();
            }