From 4f3b205d93e8f9163b293600170c9099a357ec7a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 12 Feb 2018 22:46:47 +0100 Subject: [PATCH] Fixed #71 (target cell argument is required) --- src/drc/drc/built-in-macros/drc.lym | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/drc/drc/built-in-macros/drc.lym b/src/drc/drc/built-in-macros/drc.lym index a86fb5121..514b59a4d 100644 --- a/src/drc/drc/built-in-macros/drc.lym +++ b/src/drc/drc/built-in-macros/drc.lym @@ -4694,11 +4694,20 @@ CODE else - output = @output_layout || @def_layout - output || raise("No output layout specified") - - output_cell = @output_cell || @def_cell - output_cell || raise("No output cell specified") + if @output_layout + output = @output_layout + if @output_cell + output_cell = @output_cell + elsif @def_cell + output_cell = @output_layout.cell(@def_cell.name) || @output_layout.create_cell(@def_cell.name) + end + output_cell || raise("No output cell specified (see 'target' instruction)") + else + output = @def_layout + output || raise("No output layout specified") + output_cell = @output_cell || @def_cell + output_cell || raise("No output cell specified") + end info = nil if args.size == 1