Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error on snap (deep mode) #400

Closed
klayoutmatthias opened this issue Nov 5, 2019 · 0 comments
Closed

Internal error on snap (deep mode) #400

klayoutmatthias opened this issue Nov 5, 2019 · 0 comments

Comments

@klayoutmatthias
Copy link
Collaborator

@klayoutmatthias klayoutmatthias commented Nov 5, 2019

The following script throws in internal error with the file from testdata/lvs/vexriscv.oas.gz
("Internal error: ../../../src/db/db/dbDeepRegion.cc:834 v.size () == size_t (1) was not true in Region::snap"):

ly = RBA::CellView::active.layout

dss = RBA::DeepShapeStore::new

ly.layer_indexes.each do |li|

  puts ly.get_info(li)

  r = RBA::Region::new(ly.top_cell.begin_shapes_rec(li), dss)
  
  r.merged_semantics = false
  r.snap(19, 19)

  # challenge: modifies the backannotation cellmap:
  ly.clear_layer(li)
  r.insert_into(ly, ly.top_cell.cell_index, li)
  
end

The reason is obviously a variant cell consistency issue after writing back the layers into the original layout.

The following script version works (producing a new layout):

# WORKS!
ly = RBA::CellView::active.layout

dss = RBA::DeepShapeStore::new

RBA::MainWindow::instance.create_layout(1)
lyout = RBA::CellView::active.layout
lyout.create_cell("TOP")

ly.layer_indexes.each do |li|

  puts ly.get_info(li)

  r = RBA::Region::new(ly.top_cell.begin_shapes_rec(li), dss)
  
  r.merged_semantics = false
  r.snap(19, 19)

  liout = lyout.layer(ly.get_info(li))
  r.insert_into(lyout, lyout.top_cell.cell_index, liout)
 
end

RBA::LayoutView::current.add_missing_layers

while this creates an ultimate challenge because it combines clip and snap variants:

ly = RBA::CellView::active.layout

dss = RBA::DeepShapeStore::new

region = RBA::DBox::new(121, 177, 819, 915)

ly.layer_indexes.each do |li|

  puts ly.get_info(li)

  r = RBA::Region::new(ly.top_cell.begin_shapes_rec_touching(li, region), dss)
  
  r.merged_semantics = false
  r.snap(19, 19)

  # challenge: modifies the backannotation cellmap with clip variants!
  ly.clear_layer(li)
  r.insert_into(ly, ly.top_cell.cell_index, li)
  
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.