Verilog练习:HDLBits笔记3

本文介绍了使用Verilog语言进行位操作和组合逻辑电路设计的各种实例,包括位向量的复制、拆分、反转、位选、按位逻辑运算以及向量连接等操作。通过这些例子,展示了Verilog在数字逻辑设计中的应用,涵盖了从基本的位操作到复杂的向量处理功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

二、Verilog Language

Vectors 

1、Vectors

Problem Statement:

Build a circuit that has one 3-bit input, then outputs the same vector, and also splits it into three separate 1-bit outputs. Connect output o0 to the input vector's position 0,o1 to position 1, etc.

Vector0.png

module top_module ( 
    input wire [2:0] vec,
    
    output wire [2:0] outv,
    output wire o2,
    output wire o1,
    output wire o0  
); 
    assign outv = vec;
    assign o2 = outv[2];
    assign o1 = outv[1];
    assign o0 = outv[0];

endmodule

2、Vectors in more details

Problem Statement: 

 Build a combinational circuit that splits an input half-word (16 bits, [15:0] ) into lower [7:0] and upper [15:8] bytes

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值