赛灵思
直播中

颜婷

7年用户 231经验值
私信 关注
[问答]

是否可以在不重新运行MAP的情况下添加DIRT约束?

PAR可以多次运行,每次递增路由(-k选项)。
有没有办法在这些运行之间向NCD添加DIRT约束?
我的设计需要很长时间才能通过MAP,但路由速度相当快。
我想运行MAP,执行部分路由,将这些路由锁定为DIRT约束,然后完成路由。
现在好像我必须再次运行MAP才能插入DIRT约束......有什么方法可以解决这个问题吗?

以上来自于谷歌翻译


以下为原文

PAR can be run multiple times, routing incrementally each time (-k option).

Is there any way to add DIRT constraints to the NCD between these runs?

I have a design that takes a very long time to go through MAP, but routes rather quickly.  I'd like to run MAP, do a partial route, lock down those routes as DIRT constraints, and then finish the routing.  Right now it seems like I have to run MAP again in order to insert the DIRT constraints... is there any way around this?

回帖(4)

李富才

2018-10-11 15:01:15
您也许可以使用XDL将DIRT约束插入到NCD中,但除非您编写流程的那部分内容,否则它可能会更麻烦。
SmartGuide是使用DIRT约束来锁定现有路由的另一种方法。
在原帖中查看解决方案

以上来自于谷歌翻译


以下为原文

You could perhaps use XDL to insert DIRT constraints into the NCD but that may be more trouble that it's worth unless you scripted that part of the flow. SmartGuide would be an alternative approach to using DIRT constraints to lock the existing routing.
View solution in original post
举报

李富才

2018-10-11 15:20:40
您也许可以使用XDL将DIRT约束插入到NCD中,但除非您编写流程的那部分内容,否则它可能会更麻烦。
SmartGuide是使用DIRT约束来锁定现有路由的另一种方法。

以上来自于谷歌翻译


以下为原文

You could perhaps use XDL to insert DIRT constraints into the NCD but that may be more trouble that it's worth unless you scripted that part of the flow. SmartGuide would be an alternative approach to using DIRT constraints to lock the existing routing.
举报

潘璐

2018-10-11 15:26:24
是的,我考虑过SmartGuide,但它不承诺将引导路线保持原样,此时我需要尽可能多的控制以排除这些疯狂迂回路线的原因。

以上来自于谷歌翻译


以下为原文

Yeah, I considered SmartGuide, but it doesn't promise to keep guide routes where they are, and at this point I need as much control as possible in order to rule out the causes of these crazy circuitous routes.
举报

潘璐

2018-10-11 15:32:57
您也许可以使用XDL将DIRT约束插入NCD
谢谢!
这是有效的,虽然XDL格式比我预期的要复杂一点。
为了任何其他人试图这样做的好处,这里是我正在使用的(丑陋,混乱,黑客共同)代码。
显然,“cfg”字符串开头的空格很重要;
没有它PAR将进入100%CPU循环。
此外,在xdl-> ncd-> xdl转换往返中存在某种错误;
bitgen抱怨说,ncd-built-an-xdl没有指定输入焊盘的驱动强度或转换速率,它们不需要这些属性。
import java.io. *;
import java.util。*;
公共类DirtWriter { 
public static void main(String [] args)throws Exception { 
if(args.length!= 3){ 
System.err.println(“usage:java”+ DirtWriter.class.getName()+“design_in.xdl dirtconstraints.ucf design_out.xdl”); 
返回; 

HashMap constraints = new HashMap(); 
//由fpga_editor生成的UCF非常粗糙的解析器 
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(args [1]))); 
StringBuffer acc = new StringBuffer(); 
String name = null; 
while(true){ 
boolean semicolon = false; 
String s = br.readLine(); 
if(s == null)break; 
s = s.trim(); 
if(s.startsWith(“//”))继续; 
if(s.startsWith(“NET ”“)){ 
s = s.substring(5); 
name = s.substring(0,s.indexOf(“”“)); 
s = s.substring(s.indexOf(“”“)+ 1); 
acc.append(s.trim()); 
继续; 

if(s.startsWith(“”“))s = s.substring(1); 
if(s.endsWith(“”“))s = s.substring(0,s.length() -  1); 
else if(s.endsWith(“;”)){semicolon = true;
s = s.substring(0,s.length() -  1);

acc.append(一个或多个); 
if(分号){ 
String a = acc.toString(); 
if(a.startsWith(“ROUTE =”))a = a.substring(6); 
if(a.startsWith(“”“))a = a.substring(1); 
if(a.endsWith(“”“))a = a.substring(0,a.length() -  1); 
constraints.put(name,a); 
acc.setLength(0); 


br.close(); 
br = new BufferedReader(new InputStreamReader(new FileInputStream(args [0]))); 
PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(args [2]))); 
while(true){ 
String s = br.readLine(); 
if(s == null)break; 
//粗 
String s_save = s; 
if(s.toLowerCase()。startsWith(“net”)){ 
s = s.substring(4); 
if(s.startsWith(“”“)){ 
s = s.substring(1); 
name = s.substring(0,s.indexOf(“”“)); 
s = s.substring(s.indexOf(“”“)+ 1); 
String c = constraints.get(name); 
if(c!= null){ 
pw.println(“net ”“+ name +”“,cfg ” n _NET_PROP :: ROUTE:“+ c +”“”+ s); 
constraints.remove(名称); 
继续; 



pw.println(s_save); 

pw.close(); 
br.close(); 
if(constraints.size()> 0){ 
System.out.println(“未应用的约束:”); 
for(String s:constraints.keySet())System.out.println(s); 

}
}

以上来自于谷歌翻译


以下为原文

You could perhaps use XDL to insert DIRT constraints into the NCD
 
Thanks!  This works, though the XDL format is a bit more finicky than I'd expected.  For the benefit of anybody else trying to do this, here's the (ugly, messy, hacked-together) code I'm using.  Apparently the whitespace at the beginning of the "cfg" string is important; without it PAR will go into a 100% CPU loop.
 
Also, there's some sort of bug in the xdl->ncd->xdl conversion round trip; bitgen complains that the ncd-built-from-an-xdl does not specify the drive strength or slew rate for input pads, which don't need those attributes.
 
import java.io.*;import java.util.*;public class DirtWriter {    public static void main(String[] args) throws Exception {        if (args.length != 3) {            System.err.println("usage: java "+DirtWriter.class.getName()+" design_in.xdl dirtconstraints.ucf design_out.xdl");            return;        }        HashMap constraints = new HashMap();        // incredibly crude parser for the UCFs produced by fpga_editor        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(args[1])));        StringBuffer acc = new StringBuffer();        String name = null;        while(true) {            boolean semicolon = false;            String s = br.readLine();            if (s == null) break;            s = s.trim();            if (s.startsWith("//")) continue;            if (s.startsWith("NET "")) {                s = s.substring(5);                name = s.substring(0, s.indexOf("""));                s = s.substring(s.indexOf(""")+1);                acc.append(s.trim());                continue;            }            if (s.startsWith(""")) s = s.substring(1);            if (s.endsWith(""")) s = s.substring(0, s.length()-1);            else if (s.endsWith(";")) { semicolon = true; s = s.substring(0, s.length()-1); }            acc.append(s);            if (semicolon) {                String a = acc.toString();                if (a.startsWith("ROUTE=")) a = a.substring(6);                if (a.startsWith(""")) a = a.substring(1);                if (a.endsWith(""")) a = a.substring(0, a.length()-1);                constraints.put(name, a);                acc.setLength(0);            }        }        br.close();        br = new BufferedReader(new InputStreamReader(new FileInputStream(args[0])));        PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(args[2])));        while(true) {            String s = br.readLine();            if (s == null) break;            // gross            String s_save = s;            if (s.toLowerCase().startsWith("net ")) {                s = s.substring(4);                if (s.startsWith(""")) {                    s = s.substring(1);                    name = s.substring(0, s.indexOf("""));                    s = s.substring(s.indexOf(""")+1);                    String c = constraints.get(name);                    if (c != null) {                        pw.println("net ""+name+"" , cfg "n                           _NET_PROP::ROUTE:"+c+"" "+s);                        constraints.remove(name);                        continue;                    }                }            }            pw.println(s_save);        }        pw.close();        br.close();        if (constraints.size() > 0) {            System.out.println("unapplied constraints:");            for (String s : constraints.keySet()) System.out.println(s);        }    }} 
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分