Commit 0c5b0c30 by SergeyDegtyar

Add tests for 'help' and 'echo' commands to 'misc' test group.

parent 6e06f5d2
...@@ -242,5 +242,11 @@ $(eval $(call template,pmux2shiftx_fsm, pmux2shiftx_norange pmux2shiftx_onehot_s ...@@ -242,5 +242,11 @@ $(eval $(call template,pmux2shiftx_fsm, pmux2shiftx_norange pmux2shiftx_onehot_s
#onehot #onehot
$(eval $(call template,onehot, onehot onehot_v onehot_vv )) $(eval $(call template,onehot, onehot onehot_v onehot_vv ))
#help
$(eval $(call template,help, help_celltype_plus help_celltype help_cells help_all help_command help help_no_such_command ))
#echo
$(eval $(call template,echo, echo echo_off echo_on ))
.PHONY: all clean .PHONY: all clean
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
`ifndef BUG
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
`ifndef BUG
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
...@@ -571,6 +571,22 @@ else ...@@ -571,6 +571,22 @@ else
expected_string="middle 1" expected_string="middle 1"
elif [ "$1" = "supercover" ]; then elif [ "$1" = "supercover" ]; then
expected_string="cell \$cover \$auto\$supercover" expected_string="cell \$cover \$auto\$supercover"
elif [ "$1" = "help" ]; then
if [ "$2" = "help" ]; then
expected_string="abc use ABC for technology mapping"
elif [ "$2" = "help_all" ]; then
expected_string="abc -- use ABC for technology mapping"
elif [ "$2" = "help_cells" ]; then
expected_string="\$_ANDNOT_ (A, B, Y)"
elif [ "$2" = "help_celltype" ]; then
expected_string="\$dff (CLK, D, Q)"
elif [ "$2" = "help_celltype_plus" ]; then
expected_string="\$dff (CLK, D, Q);"
elif [ "$2" = "help_command" ]; then
expected_string="read_verilog \[options\] \[filename\]"
elif [ "$2" = "help_no_such_command" ]; then
expected_string="No such command or cell type:"
fi
fi fi
if [ "$expected_string" != "" ]; then if [ "$expected_string" != "" ]; then
......
tee -q -o result.log echo
tee -q -o result.log echo off
tee -q -o result.log echo on
tee -q -o result.log help
tee -q -o result.log help -all
tee -q -o result.log help -cells
tee -q -o result.log help $dff
tee -q -o result.log help $dff+
tee -q -o result.log help read_verilog
tee -q -o result.log help u
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment