protected override void OnSynthesis(ISynthesisContext ctx) { var xproj = ctx.Project as XilinxProject; if (xproj == null) { return; } string name = ctx.CodeGen.GetComponentID(Descriptor); ComponentName = name; CoreGenDescription cgproj, xco; xproj.AddNewCoreGenDescription(name, out cgproj, out xco); xco.FromComponent(this); xco.Store(); Descriptor.AddAttribute(xco); xproj.ExecuteCoreGen(xco.Path, cgproj.Path); }
/// <summary> /// This method is called upon synthesis. Overwrite it to perform custom synthesis tasks, such as generating /// a core generator script. /// </summary> /// <param name="ctx">The synthesis context</param> virtual protected void OnSynthesis(ISynthesisContext ctx) { ctx.DoBehavioralAnalysisAndGenerate(this); }
/// <summary> /// Internal method which is called upon synthesis. /// </summary> /// <param name="ctx">The synthesis context</param> internal void OnSynthesisInternal(ISynthesisContext ctx) { OnSynthesis(ctx); }
protected override void OnSynthesis(ISynthesisContext ctx) { var xproj = ctx.Project as XilinxProject; if (xproj != null) { DeviceFamily = xproj.DeviceFamily.ToString(); string path = ctx.Project.AddFile(ImpFileName); ctx.Project.SetFileLibrary(ImpFileName, LibraryName); var impTT = new AXIMasterImp() { Master = this }; string content = impTT.TransformText(); File.WriteAllText(path, content); path = ctx.Project.AddFile(TopFileName); ctx.Project.SetFileLibrary(TopFileName, LibraryName); var topTT = new AXIMasterTop() { Master = this }; content = topTT.TransformText(); File.WriteAllText(path, content); string ipPath = Path.Combine(xproj.ISEBinPath, "..", "..", "..", "EDK", "hw", "XilinxProcessorIPLib", "pcores"); CopyEDKFiles(ipPath, "proc_common_v3_00_a", xproj); CopyEDKFiles(ipPath, "axi_lite_ipif_v1_01_a", xproj); CopyEDKFiles(ipPath, "axi_master_burst_v1_00_a", xproj); } base.OnSynthesis(ctx); }
protected override void OnSynthesis(ISynthesisContext ctx) { var xproj = ctx.Project as XilinxProject; if (xproj == null) return; string name = ctx.CodeGen.GetComponentID(Descriptor); ComponentName = name; CoreGenDescription cgproj, xco; xproj.AddNewCoreGenDescription(name, out cgproj, out xco); xco.FromComponent(this); xco.Store(); xproj.ExecuteCoreGen(xco.Path, cgproj.Path); }
protected override void OnSynthesis(ISynthesisContext ctx) { if (!(ctx.Project is XilinxProject)) { throw new InvalidOperationException("This floating point block can only be synthesized within the context of a Xilinx ISE project."); } XilinxProject xproj = (XilinxProject)ctx.Project; string name = ctx.CodeGen.GetComponentID(Descriptor); ComponentName = name; CoreGenDescription cgproj, xco; xproj.AddNewCoreGenDescription(name, out cgproj, out xco); xco.FromComponent(this); xco.Store(); xproj.ExecuteCoreGen(xco.Path, cgproj.Path); }
protected override void OnSynthesis(ISynthesisContext ctx) { var xproj = ctx.Project as XilinxProject; if (xproj == null) return; switch (xproj.ISEVersion) { case EISEVersion._11_1: // ? case EISEVersion._11_2: // ! case EISEVersion._11_3: // ? case EISEVersion._11_4: // ? case EISEVersion._11_5: // ? Generator = EGenerator.Block_Memory_Generator_3_2; break; case EISEVersion._13_2: // ! default: // ? Generator = EGenerator.Block_Memory_Generator_4_3; break; } string name = ctx.CodeGen.GetComponentID(Descriptor); ComponentName = name; CoreGenDescription cgproj, xco; xproj.AddNewCoreGenDescription(name, out cgproj, out xco); if (InitialImage != null) { string coefile = name + ".coe"; string coedir = Path.GetDirectoryName(cgproj.Path); if (!Directory.Exists(coedir)) Directory.CreateDirectory(coedir); string coepath = Path.Combine(coedir, coefile); //string coepath = xproj.AddFile(coefile); COEDescription coe = new COEDescription(COEDescription.ETarget.BlockMem); coe.Data = InitialImage; coe.Radix = 2; coe.Store(coepath); COEFile = coefile; LoadInitFile = true; } xco.FromComponent(this); xco.Store(); xproj.ExecuteCoreGen(xco.Path, cgproj.Path); }