yosys/tests
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 Remove FHS dependency by replacing /bin/bash with /usr/bin/env bash everywhere 2026-04-22 10:39:19 +02:00
alumacc Use generic testing on few more places 2026-04-16 11:00:44 +02:00
arch Revert "Fix tests due to ABC improvements" 2026-05-11 14:47:08 +02:00
arith_tree Update arith_tree tests 2026-04-16 11:04:14 +02:00
asicworld Convert autotest script wrapper 2026-04-16 11:00:44 +02:00
bind Use generic testing on few more places 2026-04-16 11:00:44 +02:00
blif Cleanup 2026-04-16 11:00:44 +02:00
bram Move output redirect to one place 2026-04-16 11:00:44 +02:00
bugpoint Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
cxxrtl Cleanup 2026-04-16 11:00:44 +02:00
errors Rename the generic "Syntax error" message from the Verilog/SystemVerilog parser into unique, 2018-10-25 02:37:56 +03:00
fmt Cleanup 2026-04-16 11:00:44 +02:00
fsm Did share, opt_share and fsm 2026-04-16 11:00:44 +02:00
functional Merge pull request #5803 from YosysHQ/emil/specrule-port-sanity 2026-04-22 10:46:36 +00:00
hana Convert autotest script wrapper 2026-04-16 11:00:44 +02:00
liberty Cleanup 2026-04-16 11:00:44 +02:00
lut Add a general tests/.gitignore and remove redundant entries in subdirectory .gitignore files. 2025-07-22 10:38:38 +00:00
memfile Cleanup 2026-04-16 11:00:44 +02:00
memlib Move output redirect to one place 2026-04-16 11:00:44 +02:00
memories Cleanup 2026-04-16 11:00:44 +02:00
opt Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
opt_share Did share, opt_share and fsm 2026-04-16 11:00:44 +02:00
peepopt Converted some more 2026-04-16 11:00:44 +02:00
proc Converted some more 2026-04-16 11:00:44 +02:00
pyosys Revert "Fix tests due to ABC improvements" 2026-05-11 14:47:08 +02:00
realmath Cleanup 2026-04-16 11:00:44 +02:00
rpc Move output redirect to one place 2026-04-16 11:00:44 +02:00
rtlil Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
sat Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
sdc Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
select Converted some more 2026-04-16 11:00:44 +02:00
share Did share, opt_share and fsm 2026-04-16 11:00:44 +02:00
sim Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
simple Convert autotest script wrapper 2026-04-16 11:00:44 +02:00
simple_abc9 Convert autotest script wrapper 2026-04-16 11:00:44 +02:00
smv Remove references to ilang 2024-11-05 12:36:31 +13:00
sva tests/sva: Skip sva tests that use SBY until SBY is compatible again 2024-03-05 14:37:33 +01:00
svinterfaces Cleanup 2026-04-16 11:00:44 +02:00
svtypes Support positional assignment patterns for unpacked arrays 2026-04-23 14:29:38 -07:00
techmap Merge pull request #5817 from YosysHQ/emil/clockgate-reject-sdffe 2026-05-08 18:38:51 +00:00
tools Merge pull request #5825 from petterreinholdtsen/autotest-race-text-busy 2026-04-28 09:12:33 +00:00
unit rtlil: extend SigSpec::extract test 2026-04-24 11:04:19 +02:00
various verilog backend: preserve `signed` on wire and port declarations 2026-05-12 18:49:55 -07:00
verific Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
verilog Convert gen-tests shell script to python 2026-04-16 11:00:44 +02:00
vloghtb tests: use /usr/bin/env for bash. 2023-08-12 11:59:39 +10:00
xprop Did share, opt_share and fsm 2026-04-16 11:00:44 +02:00
.gitignore Save results, and create summary and report 2026-04-16 11:00:44 +02:00
Makefile Update arith_tree tests 2026-04-16 11:04:14 +02:00
common.mk Move output redirect to one place 2026-04-16 11:00:44 +02:00
gen_tests_makefile.py Cleanup 2026-04-16 11:00:44 +02:00
pass-fuzzing.md Add AFL++ Grammar-Generator grammar for RTLIL fuzzing, and instructions for how to use it. 2025-12-22 21:56:26 +00:00