题解 | #位拆分与运算#

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

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

`timescale 1ns/1ns
module function_mod(
    input clk,
    input rst_n,
	input [3:0]a,
	input [3:0]b,
	
	output [3:0]c,
	output [3:0]d
);
    assign c = {a[0], a[1], a[2], a[3]};
    assign d = {b[0], b[1], b[2], b[3]};
    
endmodule
全部评论

相关推荐

不愿透露姓名的神秘牛友
11-10 11:42
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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