util_axis_resize: Add support for non power-of-two ratios
Update the axi_repack core so it can handle non power-of-two ratios between the input and output stream width. The ratio still needs to be a integer though. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>main
parent
b6458f9aab
commit
f1eb1c6064
|
@ -77,8 +77,12 @@ begin
|
|||
else if (m_ready == 1'b1)
|
||||
valid <= 1'b0;
|
||||
|
||||
if (s_ready == 1'b1 && s_valid == 1'b1)
|
||||
count <= count - 1'b1;
|
||||
if (s_ready == 1'b1 && s_valid == 1'b1) begin
|
||||
if (count == 'h00)
|
||||
count <= RATIO - 1;
|
||||
else
|
||||
count <= count - 1'b1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,8 +115,12 @@ begin
|
|||
else if (count == 'h0 && m_ready == 1'b1 && m_valid == 1'b1)
|
||||
valid <= 1'b0;
|
||||
|
||||
if (m_ready == 1'b1 && m_valid == 1'b1)
|
||||
count <= count - 1'b1;
|
||||
if (m_ready == 1'b1 && m_valid == 1'b1) begin
|
||||
if (count == 'h00)
|
||||
count <= RATIO - 1;
|
||||
else
|
||||
count <= count - 1'b1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue