extract the meaningful data from the input data, and updata it.
| 21 | |
| 22 | // extract the meaningful data from the input data, and updata it. |
| 23 | ap_uint<W_PU> update_data(ap_uint<W_PU> data) { |
| 24 | #pragma HLS inline |
| 25 | ap_uint<W_PRC> p = data.range(W_PRC - 1, 0); |
| 26 | ap_uint<W_DSC> d = data.range(W_PRC + W_DSC - 1, W_PRC); |
| 27 | ap_uint<W_PU> nd = 0; |
| 28 | nd.range(W_PRC - 1, 0) = p * 2; |
| 29 | nd.range(W_DSC + W_PRC - 1, W_PRC) = d + 2; |
| 30 | return nd; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * @brief update each data as output |
no outgoing calls
no test coverage detected