yosys/backends
Alain Dargelas 13ab5d4a67 verilog backend: preserve `signed` on wire and port declarations
`dump_wire` had no code path that emits the `signed` keyword for
wires/ports whose RTLIL `is_signed` flag is set.  Reading

  module top(input signed [9:0] in, output signed [31:0] o);
    assign o = in;
  endmodule

and writing it back via `write_verilog` produced

  input  [9:0]  in;
  output [31:0] o;

losing the declared signedness even though `wire->is_signed` was
tracked correctly in RTLIL throughout the round trip.  The IEEE
1364-2001 grammar (Annex A.2.1.2 / A.2.1.3) allows `signed` after the
direction / net-type keyword, which is the dialect `write_verilog`
targets by default — so the fix is to emit ` signed` between the
direction/net-type and the range when `wire->is_signed`.

Closes the half of chipsalliance/synlig#2425 that lives in Yosys: the
SystemVerilog frontend correctly produces a signed wire for `output int`,
but the Verilog backend dropped it on write.

Adds `tests/various/write_verilog_signed_port.ys`, which round-trips a
module with `signed` inputs, outputs, and an internal wire and greps
for the keyword on each declaration — fails without the fix, passes
with it.
2026-05-12 18:49:55 -07:00
..
aiger Cleanup docs. 2026-02-18 09:24:41 +01:00
aiger2 write_xaiger2: further cleanup 2026-04-08 11:08:44 +01:00
blif backends: use newcelltypes 2026-03-04 12:22:14 +01:00
btor write_btor: Include `$assert` and `$assume` cells in -ywmap output 2025-10-09 14:50:36 +02:00
cxxrtl cxxrtl: stable TopoSort 2026-04-06 15:09:52 +02:00
edif backends: use newcelltypes 2026-03-04 12:22:14 +01:00
firrtl Remove .c_str() calls from parameters to log_warning()/log_warning_noprefix() 2025-09-16 23:02:16 +00:00
functional Fixes 2025-12-02 11:17:21 -08:00
intersynth backends: use newcelltypes 2026-03-04 12:22:14 +01:00
jny Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
json Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
rtlil Merge pull request #5473 from YosysHQ/krys/unsized_params 2025-11-12 07:14:44 +13:00
simplec Update backends to avoid bits() 2025-09-16 03:17:23 +00:00
smt2 backends: use newcelltypes 2026-03-04 12:22:14 +01:00
smv backends: use newcelltypes 2026-03-04 12:22:14 +01:00
spice Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
table Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
verilog verilog backend: preserve `signed` on wire and port declarations 2026-05-12 18:49:55 -07:00