google / google/xls

DSLX Output Verilog: Breaking of a Wire to Tuple Having No use

Open
#1,244 0 comments 0 reactions 0 assignees View on GitHub
codegen
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

From example 9 of [Learning-Notebook](https://colab.corp.google.com/drive/1yr5csc5FWX-qdVeQmqkvFpB0u_c2fFEI?resourcekey=0-m-_nXR58_tvK_kycuHXRAg#scrollTo=XPW-7SlZFD8g) :
```
assign sum_with_carry = {1'h0, product__1} + {1'h0, ____state};
assign __statearry_bit = sum_with_carry[8];
assign sum = sum_with_carry[7:0];
assign __user_module__output_data_buf = {__statearry_bit, sum};
```

In the above example there is no use of breaking sum_with_carry into `__statearry_bit`, and `sum` as these 2 variables are anyways not used anywhere else in the code. It can be directly used as: `assign __user_module__output_data_buf = sum_with_carry;`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.