mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Update yosys from upstream
This commit is contained in:
commit
e23e33441f
13 changed files with 95 additions and 23 deletions
|
@ -11,3 +11,7 @@ run_subtest () {
|
|||
|
||||
run_subtest value
|
||||
run_subtest value_fuzz
|
||||
|
||||
# Compile-only test.
|
||||
../../yosys -p "read_verilog test_unconnected_output.v; proc; clean; write_cxxrtl cxxrtl-test-unconnected_output.cc"
|
||||
${CC:-gcc} -std=c++11 -c -o cxxrtl-test-unconnected_output -I../../backends/cxxrtl/runtime cxxrtl-test-unconnected_output.cc
|
||||
|
|
24
tests/cxxrtl/test_unconnected_output.v
Normal file
24
tests/cxxrtl/test_unconnected_output.v
Normal file
|
@ -0,0 +1,24 @@
|
|||
(* cxxrtl_blackbox *)
|
||||
module blackbox(...);
|
||||
(* cxxrtl_edge = "p" *)
|
||||
input clk;
|
||||
|
||||
(* cxxrtl_sync *)
|
||||
output [7:0] out1;
|
||||
|
||||
(* cxxrtl_sync *)
|
||||
output [7:0] out2;
|
||||
endmodule
|
||||
|
||||
module unconnected_output(
|
||||
input clk,
|
||||
in,
|
||||
output out
|
||||
);
|
||||
blackbox bb (
|
||||
.clock (clock),
|
||||
.in (in),
|
||||
.out1 (out),
|
||||
.out2 (/* unconnected */),
|
||||
);
|
||||
endmodule
|
|
@ -1,3 +1,4 @@
|
|||
#include <cinttypes>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
@ -62,17 +63,17 @@ void test_binary_operation_for_bitsize(Operation &op)
|
|||
for (size_t i = 0; i * chunk_bits < Bits; i++) {
|
||||
if ((chunk_type)(iresult >> (i * chunk_bits)) != vresult.data[i]) {
|
||||
std::printf("Test failure:\n");
|
||||
std::printf("Bits: %i\n", Bits);
|
||||
std::printf("a: %016lx\n", ia);
|
||||
std::printf("b: %016lx\n", ib);
|
||||
std::printf("iresult: %016lx\n", iresult);
|
||||
std::printf("vresult: %016lx\n", vresult.template get<uint64_t>());
|
||||
std::printf("Bits: %zu\n", Bits);
|
||||
std::printf("a: %016" PRIx64 "\n", ia);
|
||||
std::printf("b: %016" PRIx64 "\n", ib);
|
||||
std::printf("iresult: %016" PRIx64 "\n", iresult);
|
||||
std::printf("vresult: %016" PRIx64 "\n", vresult.template get<uint64_t>());
|
||||
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
}
|
||||
std::printf("Test passed @ Bits = %i.\n", Bits);
|
||||
std::printf("Test passed @ Bits = %zu.\n", Bits);
|
||||
}
|
||||
|
||||
template<typename Operation>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue