From fdcfe8cd8188b6c4ea2450843bd22d822856a091 Mon Sep 17 00:00:00 2001 From: Maciej Dudek Date: Mon, 30 Aug 2021 11:12:49 +0200 Subject: Adding support for MacroCells --- fpga_interchange/macros.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fpga_interchange/macros.cc') diff --git a/fpga_interchange/macros.cc b/fpga_interchange/macros.cc index 762615c1..4011f683 100644 --- a/fpga_interchange/macros.cc +++ b/fpga_interchange/macros.cc @@ -50,6 +50,7 @@ static IdString derived_name(Context *ctx, IdString base_name, IdString suffix) void Arch::expand_macros() { + log_info("Expand macros\n"); // Make up a list of cells, so we don't have modify-while-iterating issues Context *ctx = getCtx(); std::vector cells; @@ -78,6 +79,7 @@ void Arch::expand_macros() // Get the ultimate root of this macro expansion IdString parent = (cell->macro_parent == IdString()) ? cell->name : cell->macro_parent; + log_info("%s %s\n", cell->name.c_str(ctx), parent.c_str(ctx)); // Create child instances for (const auto &inst : macro->cell_insts) { CellInfo *inst_cell = @@ -86,6 +88,7 @@ void Arch::expand_macros() inst_cell->params[IdString(param.key)] = IdString(param.value).str(ctx); } inst_cell->macro_parent = parent; + log_info(" %s %s\n", inst_cell->name.c_str(ctx), inst_cell->type.c_str(ctx)); next_cells.push_back(inst_cell); } // Create and connect nets -- cgit v1.2.3 From ea489f6d934ac6e649bcd81e10856e809f6b30d2 Mon Sep 17 00:00:00 2001 From: Maciej Dudek Date: Mon, 27 Sep 2021 16:16:33 +0200 Subject: Fix small isses and code formatting Signed-off-by: Maciej Dudek --- fpga_interchange/macros.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'fpga_interchange/macros.cc') diff --git a/fpga_interchange/macros.cc b/fpga_interchange/macros.cc index 4011f683..aa7d3184 100644 --- a/fpga_interchange/macros.cc +++ b/fpga_interchange/macros.cc @@ -79,7 +79,6 @@ void Arch::expand_macros() // Get the ultimate root of this macro expansion IdString parent = (cell->macro_parent == IdString()) ? cell->name : cell->macro_parent; - log_info("%s %s\n", cell->name.c_str(ctx), parent.c_str(ctx)); // Create child instances for (const auto &inst : macro->cell_insts) { CellInfo *inst_cell = @@ -88,7 +87,6 @@ void Arch::expand_macros() inst_cell->params[IdString(param.key)] = IdString(param.value).str(ctx); } inst_cell->macro_parent = parent; - log_info(" %s %s\n", inst_cell->name.c_str(ctx), inst_cell->type.c_str(ctx)); next_cells.push_back(inst_cell); } // Create and connect nets -- cgit v1.2.3