当前位置: 首页 > news >正文

HDLBits-Verilog学习记录 | Verilog Language-Basics(1)

文章目录

  • 3.Simple wire
  • 4.Four wires
  • 5.inverter | Notgate
  • 6. And gate
  • 7.Nor gate
  • 8.Xnorgate

3.Simple wire

problem:Create a module with one input and one output that behaves like a wire.

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

4.Four wires

problem:Create a module with 3 inputs and 4 outputs that behaves like wires that makes these connections:

a -> w
b -> x
b -> y
c -> z

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

5.inverter | Notgate

problem:Create a module that implements a NOT gate.

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

6. And gate

problem:Create a module that implements an AND gate.

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

7.Nor gate

problem:Create a module that implements a NOR gate. A NOR gate is an OR gate with its output inverted. A NOR function needs two operators when written in Verilog.

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

8.Xnorgate

problem: Create a module that implements an XNOR gate.

module top_module( input a, input b, output out );assign out = ~(a ^ b);
endmodule
http://www.lryc.cn/news/137696.html

相关文章:

  • elementui表格嵌套上传文件直传到oss服务器(表单上传)
  • 使用navicat来访问doris
  • 2023国赛数学建模思路 - 案例:异常检测
  • redis实战-缓存三剑客穿透击穿雪崩解决方案
  • Tomcat10安装及配置教程win11
  • 遗传算法解决TSP问题
  • 设计模式-工厂设计模式
  • TM4C123库函数学习(3)---串口中断
  • opencv 进阶13-Fisherfaces 人脸识别-函数cv2.face.FisherFaceRecognizer_create()
  • 基于mysql5.7制作自定义的docker镜像,适用于xxl-job依赖的数据库,自动执行初始化脚本(ddl语句和dml语句)
  • LeetCodeHot100python版本:单调栈,栈,队列,堆
  • JUC初识
  • stm32之5.长按按键(使用时钟源)调整跑马灯速度
  • element ui datePick时间日期一段时间,限制选择日期的范围
  • kubernetes--技术文档-真--集群搭建-三台服务器一主二从(非高可用)-三服务器位于同交换机中
  • 高性能MySQL实战(三):性能优化
  • 198. 打家劫舍
  • Pydev·离线git包
  • Vue-12.集成postcss.config.js
  • 基于前端技术原生HTML、JS、CSS 电子病历编辑器源码
  • Linux环境下远程访问SVN服务:SVN内网穿透的详细配置与操作指南
  • 创建k8s operator
  • python模拟登入某平台+破解验证码
  • 【图像分割】理论篇(2)经典图像分割网络基于vgg16的Unet
  • vue插入重复的html内容
  • 计算机网络-物理层(三)-信道的极限容量
  • Http/Websocket协议的长连接和短连接的错误认识详细解读(史上最通俗)
  • 两两交换链表中的节点
  • HTTP与RPC的取舍
  • 微前端学习(上)