Download chips/yosys/tests/arith_tree/arith_tree_link_shape.ys from STAR-future/Trinity-SciData: direct link, hf CLI and curl.
- Browser
- Download file 945 Bytes
-
https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/tests/arith_tree/arith_tree_link_shape.ys
- Command line
-
hf download hf://datasets/STAR-future/Trinity-SciData/chips/yosys/tests/arith_tree/arith_tree_link_shape.ys
-
curl -L -o arith_tree_link_shape.ys https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/tests/arith_tree/arith_tree_link_shape.ys
945 Bytes
| #6324 | |
| read_verilog <<EOT | |
| module rotr1(input [3:0] a, b, d, output [3:0] y); | |
| wire [3:0] c = a + b; | |
| assign y = {c[0], c[3:1]} + d; | |
| endmodule | |
| EOT | |
| hierarchy -auto-top | |
| proc | |
| equiv_opt -assert arith_tree | |
| design -load postopt | |
| select -assert-none t:$fa | |
| design -reset | |
| # link in both ports stays a leaf | |
| read_verilog <<EOT | |
| module both(input [3:0] a, b, d, output [3:0] y); | |
| wire [3:0] v = a + b; | |
| wire [3:0] w = v + v; | |
| assign y = w + d; | |
| endmodule | |
| EOT | |
| hierarchy -auto-top | |
| proc | |
| equiv_opt -assert arith_tree | |
| design -load postopt | |
| select -assert-count 1 t:$fa | |
| select -assert-count 2 t:$add | |
| design -reset | |
| # link in one port and shifted in the other stays a leaf | |
| read_verilog <<EOT | |
| module shiftadd(input [7:0] a, b, d, output [7:0] y); | |
| wire [7:0] u = a + b; | |
| assign y = u + {u[4:0], 3'b000} + d; | |
| endmodule | |
| EOT | |
| hierarchy -auto-top | |
| proc | |
| equiv_opt -assert arith_tree | |
| design -load postopt | |
| select -assert-count 1 t:$fa | |
| select -assert-count 2 t:$add | |
| design -reset | |