Home > other >  Verilog: pick a nonzero data from an array and according to the original order
Verilog: pick a nonzero data from an array and according to the original order

Time:11-25

Pick a nonzero data from an array and according to the original order, requires the use of combinational logic in a cycle, example: an array input wire array [away] [0:7]=,1,0,3,0,5,0,7 [0], get [away] new_array [0:7]=,3,5,7,0,0,0,0 [1], the normal operation, the first to get the original array of data corresponding to the nonzero subscript (such as: indix [I]), then the original array access to another new array (such as: new_array [j]=array [indix [I]]),
Question 1: how to implement? The generate - for method?
Question 2: a better approach?
  • Related