Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Magma TCL scripting problem

Status
Not open for further replies.

sabkumar.r

Junior Member level 2
Junior Member level 2
Joined
May 17, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,445
Hi,
I am just getting started with TCL scripting in Magma. I need to do the following basic tasks:
1) find the number of flipflops in the design
2) number of macros in the design
3) number of logic nets in the design

My magma talus version; 1.2.2e.1-linux26_x86_64

I understand that the basic idea is to loop around all cells and find whether they re flops are not. But which attribute of the cell tells me that??
any sample script/ tips will be greatly appreciated.

Thanks
 

Dear sabkumar,

As you've said there can be many way to do that (by the way, I've used Blastfusion, but as far as I know many commands are similar):

1 - report model $m -file report_model.rpt
- It has a lot information on the design
- or you can use similar approach in item 2.

2 - As you said loop over all the cells like below:
data loop c "model_cell_leaf -cell_type macro" $m {
set ma [data only cell_model $c]
puts "$ma : $c"
}
You can play with the cell_type option.

By the way if you would like to know which relations exists, just run: "data relation". this will give you a lot of relations related to objects (e.g. cells, nets, ...)

3 - Again "report model" will have some information on logic nets.

I hope it helps,
Gökhan
---
 

Dear sabkumar,

As you've said there can be many way to do that (by the way, I've used Blastfusion, but as far as I know many commands are similar):

1 - report model $m -file report_model.rpt
- It has a lot information on the design
- or you can use similar approach in item 2.

2 - As you said loop over all the cells like below:
data loop c "model_cell_leaf -cell_type macro" $m {
set ma [data only cell_model $c]
puts "$ma : $c"
}
You can play with the cell_type option.

By the way if you would like to know which relations exists, just run: "data relation". this will give you a lot of relations related to objects (e.g. cells, nets, ...)

3 - Again "report model" will have some information on logic nets.

I hope it helps,
Gökhan
---
Thanks a lot Gokhan. I figured out a lot by going through the documentation. M totally new to VLSI design. I need to get used to Magma for my project. If you can suggest any tutorials/ exercises, it would be most helpful
 

I have one more query.. say I am given two hard macros..my aim is to find which pins of the macros are connected to each other. I can find the pins of each macro using cell_pin. Now i can loop through the pins and find the nets each pin is connected to using pin_net. Now for each such net, i can find the pins connected to the net using net_pin. I will have to check if any of those pins match with the pins of the second macro.

Is my approach correct? is there a more efficient one?
 

Hi sabkumar,

That seems ok.

While checking, you can use regular expression to see if intended cell is connected to that net. And if both cell pins are connected redirect it to a file.

BR,
Gökhan
---
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top