3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-09 20:50:51 +00:00

cxxrtl: WIP: adjust comb display cells to only fire on change

Naming and use of statics to be possibly revised.
This commit is contained in:
Charlotte 2023-06-28 11:51:30 +10:00 committed by Marcelina Kościelnicka
parent 7f7c61c9f0
commit 843ad9331b
8 changed files with 95 additions and 16 deletions

View file

@ -47,12 +47,19 @@ test_roundtrip oct_signed -DBASE_HEX -DSIGN="signed"
test_roundtrip bin_unsigned -DBASE_HEX -DSIGN=""
test_roundtrip bin_signed -DBASE_HEX -DSIGN="signed"
../../yosys -p "read_verilog always_full.v; write_cxxrtl -print-output std::cerr yosys-always_full.cc"
${CC:-gcc} -std=c++11 -o yosys-always_full -I../.. always_full_tb.cc -lstdc++
./yosys-always_full 2>yosys-always_full.log
iverilog -o iverilog-always_full always_full.v always_full_tb.v
./iverilog-always_full | awk '/<<<BEGIN>>>/,/<<<END>>>/ {print $0}' >iverilog-always_full.log
diff iverilog-always_full.log yosys-always_full.log
test_cxxrtl () {
local subtest=$1; shift
../../yosys -p "read_verilog ${subtest}.v; write_cxxrtl -print-output std::cerr yosys-${subtest}.cc"
${CC:-gcc} -std=c++11 -o yosys-${subtest} -I../.. ${subtest}_tb.cc -lstdc++
./yosys-${subtest} 2>yosys-${subtest}.log
iverilog -o iverilog-${subtest} ${subtest}.v ${subtest}_tb.v
./iverilog-${subtest} |grep -v '\$finish called' >iverilog-${subtest}.log
diff iverilog-${subtest}.log yosys-${subtest}.log
}
test_cxxrtl always_full
test_cxxrtl always_comb
../../yosys -p "read_verilog display_lm.v" >yosys-display_lm.log
../../yosys -p "read_verilog display_lm.v; write_cxxrtl yosys-display_lm.cc"