3.5.1.17.3 Return Struct By Value
(Ask a Question)SmartHLS™ supports returning a struct
by value from the top-level function. In this case, the return value is always bit-packed resulting in a scalar interface. In our example, the RTL module will have a return_val
port with 129 bit width (updated
= 1-bit, acc
= 128-bits):
module update_top ( clk, reset, start, ready, finish, return_val, ... ) input clk; input reset; input start; output reg ready; output reg finish; output reg [128:0] return_val; ...