HDLBits(1.0-3.0)

这篇博客主要介绍了Verilog语言的基础知识,包括简单的wire声明、逻辑门(如NOT、AND、NOR、XNOR)、7458芯片的使用。此外,还深入探讨了向量的概念,如向量的细节、部分选择、位运算、四输入门、拼接操作、反转和复制等,是学习Verilog语言的好资源。
摘要由CSDN通过智能技术生成

目录

1 Getting Started

1.1 Getting Started(Step one)

1.2 Output Zero(Zero)

2 Verilog Language

2.1 Basics

2.1.1 Simple wire(wire)

2.1.2 Four wires(wire4)

2.1.3 Inverter(Notgate)

2.1.4 AND gate(Andgate)

2.1.5 NOR gate (Norgate)

2.1.6 XNOR gate(Xnorgate)

2.1.7 Declaring wires(Wire decl)

2.1.8 7458 chip(7458)

2.2 vectors

2.2.1 Vectors(Vector0)

2.2.2 Vectors in more detail(Vector1)

2.2.3 Vector part select(Vector2)

2.2.4 Bitwise operators(Vectorgates)

2.2.5 Four-input gates(Gates4)

2.2.6 Vector concatenation operator(Vector3)

2.2.7 Vector reversal 1(Vectorr)

2.2.8 Replication operation(Vector4)

2.2.9 More replication(Vector5)


1 Getting Started

1.1 Getting Started(Step one)

module top_module( output one );
 
// Insert your code here
    assign one = 1'b1;
endmodule

1.2 Output Zero(Zero)

module top_module(
    output zero
);// Module body starts after semicolon
    
    assign zero = 1'b0;
 
endmodule

2 Verilog Language

2.1 Basics

2.1.1 Simple wire(wire)

module top_module( input in, output out );

assign out = in;

endmodule

2.1.2 Four wires(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

2.1.3 Inverter(Notgate)

module top_module( input in, output out );

    assign out = ~in;
    
endmodule

2.1.4 AND gate(Andgate)

module top_module( 
    input a, 
    input b, 
    output out );

    assign out = a & b;
    
endmodule

2.1.5 NOR gate (Norgate)

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

endmodule

2.1.6 XNOR gate(Xnorgate)

module top_module( 
    input a, 
    input b, 
    output out );

    assign out = ~(a ^ b);
endmodule

2.1.7 Declaring wi

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值