用于比较单元和引脚的两个库的代码 [英] Code to compare two libraries for cells and pins

查看:53
本文介绍了用于比较单元和引脚的两个库的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是unix和perl的新手。虽然我已经完成了两者的一些基础知识,但我仍然不太习惯使用它们。我收到了以下作业。任何人都可以帮忙:

[

文件名:compareLib.pl


Lib1

Cell: AND1

A1 A2 Y

Cell:INV1

AZ


Lib2

单元格:AND1

ABY

单元格:INV2

AZ


预期o / p:

compareLib.pl< Lib1> < LIB2>

- LIB2缺少INV1

- LIB1缺少INV2

- LIB2缺少AND1 / A1

- LIB1中缺少AND1 / A

- LIB1中缺少AND1 / A


/>
打开Lib1

匹配单元格字符串:获取变量中的单元格名称

匹配引脚名称:$ hash1 {$ cell} {$ pin} = 1;


打开Lib2

匹配单元格字符串:获取变量中的单元格名称

匹配引脚名称: $ HASH2 {$细胞} {$销} = 1;


通过hash1迭代并检查hash2中是否存在。如果没有报告缺失...

通过hash2迭代并检查hash1中是否存在。如果没有报失...

]


我会很乐意为你提供任何帮助。

thanx

解决方案

hash1 {


cell} {


pin} = 1;


打开Lib2

匹配单元格字符串:获取变量中的单元格名称

匹配引脚名称:

I am totally new to unix and perl. Although I have gone thtough some basics of both, I am still not quite comfortable with using them. I have received the following assignment. Can anyone pls help:
[
filename: compareLib.pl

Lib1
Cell : AND1
A1 A2 Y
Cell : INV1
A Z

Lib2
Cell : AND1
A B Y
Cell : INV2
A Z

expected o/p:
compareLib.pl <Lib1> <Lib2>
- INV1 missing in LIB2
- INV2 missing in LIB1
- AND1/A1 missing in LIB2
- AND1/A2 missing in LIB2
- AND1/A missing in LIB1
- AND1/A missing in LIB1



open Lib1
match for cell string : get cell name in a variable
match for pin names : $hash1{$cell}{$pin}=1;


open Lib2
match for cell string : get cell name in a variable
match for pin names : $hash2{$cell}{$pin}=1;

Iterate through hash1 and check is exists in hash2 or not. If not report missing...
Iterate through hash2 and check is exists in hash1 or not. If not report missing...
]

I shall be great full for any help on this.
thanx

解决方案

hash1{


cell}{


pin}=1;


open Lib2
match for cell string : get cell name in a variable
match for pin names :


这篇关于用于比较单元和引脚的两个库的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆