hdlbits练习题答案(更新中)

本文分享了作者在学习Verilog过程中在HDLBits网站上的练习题答案,涵盖基础知识、向量和模块层次等内容,旨在促进学习交流。
摘要由CSDN通过智能技术生成

        最近在学习Verilog,发现hdlbits是个挺不错的练习网站。以下是我自己做的答案,希望与大家一起交流、进步。(本博客将持续更新

  • Verilog Language
    • Basics
      • Wire
        module top_module( input in, output out );
            assign out = in;
        endmodule
      • Wire4
        module top_module( input a,b,c, output w,x,y,z );
            assign w = a;
            assign x = b;
            assign y = b;
            assign z = c;
        endmodule
      • notgate

        module top_module( input in, output out );
            assign out = ~in;
        endmodule
      • andgate

        module top_module( input a, input b, output out );
            assign out = a&b;
        endmodule
      • norgate

        module top_module( input a, input b, output out );
            assign out = ~(a|b);
        endmodule
      • xorgate

        module top_module( input a, input b, output out );
            assign out = (a&b)|(~a&~b);
        endmodule
      • wire decl
        module top_module( input a, input b, input c, input d, output out, output out_n   ); 
            wire ab_and,cd_and;
            assign ab_and = a&b;
            assign cd_and = c&d;
            assign out = ab_and | cd_and;
            assign out_n = ~out;
        endmodule
      • 7458

        module top_module 
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值