提交 cba8f453 编写于 作者: L LinJiawei

scripts: add a line-count statistic script

上级 d2cf343d
mymap = {}
last = ""
with open("../build/XSSimTop.v", "r") as f:
line = f.readline()
cnt = 0
while(line):
if "module " in line:
if last!="" :
mymap[last] = cnt
last = line[6:-2]
cnt = 1
else:
cnt = cnt + 1
line = f.readline()
for k,v in mymap.items():
print(k, v)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册