In contrast to GDS2, OASIS specifies paths by half the width. This value must be a multiple of the database unit. An path with a width that is an odd multiple of the database unit therefore must be rounded so that it can be written to an OASIS file. Since rounding in the worst case may create gaps, the OASIS writer simply does not allow odd path widths.
In general the presence of paths with an odd width imposes rounding problems when the layout is processed further (i.e. on mask processing) and in my opinion should be avoided (i.e. if necessary by reducing the database unit).
I admit that the error message is somewhat unspecific. I attached a ruby script (see below) to find any paths with odd widths. It may be helpful to correct these paths if required.
Best regards,
Matthias
class MenuAction < RBA::Action
def initialize( title, shortcut, &action )
self.title = title
self.shortcut = shortcut
@action = action
end
def triggered
@action.call( self )
end
private
@action
end
$find_odd_width_paths = MenuAction.new( "Find Paths With Odd Width", "" ) do
app = RBA::Application.instance
mw = app.main_window
lv = mw.current_view
if lv == nil
raise "No view selected"
end
cv = lv.active_cellview
if !cv.is_valid?
raise "No cell or no layout found"
end
cv.layout.each_cell do |cell|
(0..(cv.layout.layers-1)).each do |l|
if cv.layout.is_valid_layer?(l)
cell.shapes(l).each do |s|
if s.is_path? && (s.path_width % 2) == 1
if RBA::MessageBox::info("Path with odd width",
"Cell: #{cv.layout.cell_name(cell.cell_index)}\n" +
"Layer: #{cv.layout.get_info(l).to_s}\n" +
"Path: #{s.path.to_s}\n" +
"\n" +
"Press 'Ok' to continue, 'Cancel' to stop.",
RBA::MessageBox::b_ok + RBA::MessageBox::b_cancel) == RBA::MessageBox::b_cancel
raise "Operation aborted"
end
end
end
end
end
end
end
app = RBA::Application.instance
mw = app.main_window
menu = mw.menu
menu.insert_separator("tools_menu.end", "name")
menu.insert_item("tools_menu.end", "find_odd_width_paths", $find_odd_width_paths)
Comments
Hi roman,
In contrast to GDS2, OASIS specifies paths by half the width. This value must be a multiple of the database unit. An path with a width that is an odd multiple of the database unit therefore must be rounded so that it can be written to an OASIS file. Since rounding in the worst case may create gaps, the OASIS writer simply does not allow odd path widths.
In general the presence of paths with an odd width imposes rounding problems when the layout is processed further (i.e. on mask processing) and in my opinion should be avoided (i.e. if necessary by reducing the database unit).
I admit that the error message is somewhat unspecific. I attached a ruby script (see below) to find any paths with odd widths. It may be helpful to correct these paths if required.
Best regards,
Matthias
I've saved the attached code in file find_odd_width_paths.rb and tried to invoke klayout by:
klayout -r find_odd_width_paths.rb
Unfortunately the tool crashed.
I'm not familiar with ruby , would you review the code again?
Thanks.
Hi Roman,
I assume the application simply doesn't start. That's because with the "-r" option the script is executed but then the application exits.
The correct option would be "-rm" which loads a ruby script and then continues running the application:
If that still does not work it might be a problem with copying and pasting the script. It that is the case, I have provided a download link here.
Best regards,
Matthias