OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

GUI Unexpectedly Exits On Error

Open QuantamHD opened this issue 3 years ago • 11 comments

This script

set clock_ports {}
foreach clock [all_clocks] {
    foreach pin [$clock sources] {
        lappend clock_ports [$pin port] 
    }
}

foreach input [all_inputs] {
    set is_clock 0
    foreach clock_port $clock_ports {
        if {[$clock_port bus_name] == [$input bus_name]} {
            set is_clock 1
        }
    }
    if $is_clock == 1{
        puts $is_clock
    }
}

Will cause openROAD GUI to immediately exit when run after reading in a design

QuantamHD avatar Sep 15 '22 22:09 QuantamHD

@QuantamHD is this design dependent? I don't get this behavior. But I do get:

>>> set clock_ports {}
... foreach clock [all_clocks] {
...     foreach pin [$clock sources] {
...         lappend clock_ports [$pin port] 
...     }
... }
... 
... foreach input [all_inputs] {
...     set is_clock 0
...     foreach clock_port $clock_ports {
...         if {[$clock_port bus_name] == [$input bus_name]} {
...             set is_clock 1
...         }
...     }
...     if $is_clock == 1{
...         puts $is_clock
...     }
... }
[ERROR GUI-0070] invalid command name "=="

gadfort avatar Sep 16 '22 12:09 gadfort

I haven't tried it with other designs. I did have a database loaded at the time.

QuantamHD avatar Sep 17 '22 23:09 QuantamHD

@QuantamHD could you upload a test case that replicates it for you? I can't seem to get it on my end.

gadfort avatar Sep 18 '22 14:09 gadfort

Let me see what I can do.

QuantamHD avatar Sep 18 '22 15:09 QuantamHD

This is not valid tcl:

if $is_clock == 1{

it should be if { $is_clock == 1 } {

jjcherry56 avatar Sep 20 '22 00:09 jjcherry56

It is hard to imagine how this tcl code would have any effect on the GUI

maliberty avatar Sep 20 '22 02:09 maliberty

It's an uncaught syntax error from the looks of it. The code above has syntax errors in it, but those errors appear to not be caught

QuantamHD avatar Sep 20 '22 10:09 QuantamHD

However, only I seem to be able to reproduce it

QuantamHD avatar Sep 20 '22 10:09 QuantamHD

@QuantamHD if there is a stack trace that might be helpful.

gadfort avatar Sep 20 '22 13:09 gadfort

@QuantamHD I'm able to get a stack trace if I add your code to a script at startup and run openroad with -gui -exit, are you adding the -exit? this should be fixed either way

gadfort avatar Sep 20 '22 14:09 gadfort

@QuantamHD does this prevent the issue you are seeing? https://github.com/The-OpenROAD-Project/OpenROAD/pull/2285

gadfort avatar Sep 20 '22 15:09 gadfort

@QuantamHD still relevant?

maliberty avatar Dec 15 '22 04:12 maliberty

I'll try again.

QuantamHD avatar Dec 15 '22 05:12 QuantamHD

@QuantamHD Waiting for your update to resolve it.

vijayank88 avatar Jun 19 '23 11:06 vijayank88