题解 | #多位信号#

多位信号

https://www.nowcoder.com/practice/2df35378ad06477eb3c1fcba16c78709


`timescale 1ns/1ns

module top_module(
    input [2:0] in,
    output reg a,
    output reg b,
    output reg c
);

    always@(*)
        begin
            case(in)
                3'b000: c = in[0];
                3'b001: b = in[1];
                3'b010: a = in[2];
            endcase
        end
endmodule

全部评论

相关推荐

牛客刘北:如果暑期实习是27届的话,你要晚一年才会毕业,企业为什么会等你呢?要搞清时间逻辑呀!27届现在实习只能是在暑假实习,这是日常实习,不是暑期实习。所以多去投日常实习吧,暑期实习肯定不会要你的
点赞 评论 收藏
分享
06-19 19:06
门头沟学院 Java
码农索隆:别去东软,真学不到东西,真事
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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