题解 | #使用函数实现数据大小端转换#

使用函数实现数据大小端转换

https://www.nowcoder.com/practice/74c0c19ad0c444959c436a049647a93c

`timescale 1ns/1ns
module function_mod(
	input [3:0]a,
	input [3:0]b,
	
	output [3:0]c,
	output [3:0]d
);

assign c = hahha(a);
assign d = hahha(b);




function [3:0] hahha;
input [3:0]caca;
begin
	hahha[0] = caca[3];
	hahha[1] = caca[2];
	hahha[2] = caca[1];
	hahha[3] = caca[0];
end

endfunction

endmodule

全部评论

相关推荐

Lorn的意义:你这种岗位在中国现在要么牛马天天加班,要么关系户进去好吃好喝,8年时间,真的天翻地覆了,对于资本来说你就说一头体力更好的牛马,哎,退伍没有包分配你真的亏了。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务