function [31:0] swapn (input [31:0] data);
integer i;
for (i=0; i<(31); i=i+8) swapn[i+:8] = data[(31-i)-:8];
endfunction : swapn
verilog大小端转化
最新推荐文章于 2024-06-21 07:44:41 发布
function [31:0] swapn (input [31:0] data);
integer i;
for (i=0; i<(31); i=i+8) swapn[i+:8] = data[(31-i)-:8];
endfunction : swapn