3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-08-09 23:51:08 +00:00
yosys/techlibs/common
Emil J. Tywoniak f42923d896 mul2dsp: declare $__mul and $__soft_mul so their ports have directions
Neither is a cell anything implements. They exist so a mapping rule can
re-emit a multiplier without matching itself, and a later techmap or
`chtype` consumes them. Nothing ever declared them, so
`Cell::port_dir()` fell through to PD_UNKNOWN for every port, and
anything that has to tell a cell's inputs from its outputs had to guess.

signorm guesses "output": setup_driven_wires() skips only PD_INPUT, so
\A and \B of a $__mul are read as drivers. \B is the enclosing module's
own input, already driven by its $input_port cell, and \A is a slice, so
both take the fallback -- interpose a helper wire and connect it -- and
both sides then look driven, which is what a $connect means. _80_mul's
wide branch has two $__mul instances, and it runs `proc; clean` through
_TECHMAP_DO_, whose closing opt_expr normalizes the map design. Result:
four helper wires and four $connect cells manufactured out of a design
that has no multi-driver net in it anywhere.

Declaring them as blackboxes gives the interface a definition without
making them mappable: techmap skips blackbox templates outright
(`tpl->get_blackbox_attribute(ignore_wb)`), and every rule that emits
these types carries an explicit techmap_celltype, so nothing was relying
on matching them by module name.

96deee136 stopped the $connect cells escaping the index, which is right
regardless; this stops them being created. `make -C tests` is unchanged
at 7 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQU5XCqDYY8MbivGkNRrDo
2026-07-21 17:45:02 +02:00
..
choices Merge pull request #4789 from YosysHQ/emil/sklansky-adder 2024-12-03 11:33:13 +01:00
abc9_map.v
abc9_model.v
abc9_unmap.v
adff2dff.v
CMakeLists.txt Migrate build system to CMake 2026-06-03 08:58:10 +00:00
cmp2lcu.v
cmp2lut.v
cmp2softlogic.v techlibs: Add cmp2softlogic.v to common 2023-11-13 10:42:12 +01:00
dff2ff.v
gate2lut.v
gen_fine_ffs.py simcells: Apply group tags 2024-10-15 07:35:40 +13:00
mul2dsp.v mul2dsp: declare $__mul and $__soft_mul so their ports have directions 2026-07-21 17:45:02 +02:00
opensta.cc WIP 2026-07-20 12:27:17 +02:00
opensta.h opensta: refactor default command 2025-11-19 15:20:50 +01:00
pmux2mux.v
prep.cc Move Design::sort() calls out of opt and opt_clean passes into the synth passes that need them. 2026-01-23 01:14:35 +00:00
sdc_expand.cc opensta, sdc_expand: mark as experimental 2025-11-19 15:31:17 +01:00
simcells.v simcells: $dffsr and derivatives undefine S&R in logic tables 2026-03-19 19:27:30 +01:00
simlib.v WIP 2026-07-20 12:27:02 +02:00
smtmap.v Add smtmap.v describing the smt2 backend's behavior for undef bits 2022-10-20 15:48:18 +02:00
synth.cc Add latch inference msg severity option. 2026-06-15 14:17:02 +02:00
techmap.v WIP 2026-07-17 23:48:54 +02:00