当前位置:网站首页>Verilog语法基础HDL Bits训练 09
Verilog语法基础HDL Bits训练 09
2022-08-08 13:06:00 【南邮学渣】
文章目录
Circuits:Karnaugh Map to Circuit
一、3-variable
本小节讲通过卡诺图化简得出表达式
本题化简完毕是
- RTL代码
module top_module(
input a,
input b,
input c,
output out );
assign out = ~(~a & ~b & ~c);
endmodule
- 仿真波形图
二、4-variable
卡诺图化简结果为
- RTL代码
module top_module(
input a,
input b,
input c,
input d,
output out );
assign out = ( ~a & ~b & ~c) | (a & ~b & ~c) | (~a & ~d) | (b & c & d) | (a & ~b & d);
endmodule
- 仿真波形图
三、4-variable
卡诺图化简为(要注意看外一行的数字,有陷阱)
- RTL代码
module top_module(
input a,
input b,
input c,
input d,
output out );
assign out = a | (~b & c);
endmodule
- 仿真波形图
四、4-variable
- RTL代码
module top_module(
input a,
input b,
input c,
input d,
output out );
assign out = (~a&~b&~c&d)|(~a&b&~c&~d)|(a&b&~c&d)|(a&~b&~c&~d)|(~a&b&c&d)|(a&~b&c&d)|(~a&~b&c&~d)|(a&b&c&~d);
endmodule
- 仿真波形图
五、Minimum SOP and POS
SOP是以1为中心圈卡诺圈,POS是以0为中心圈卡诺圈,二者用的是同一张卡诺图。
- RTL代码
module top_module (
input a,
input b,
input c,
input d,
output out_sop,
output out_pos
);
assign out_sop = (c & d) | (~a & ~b &c);
assign out_pos = c & (~b | d) & (~a | d);
endmodule
六、Karnaugh map
- RTL代码
module top_module (
input [4:1] x,
output f );
assign f = (x[2] & x[4]) | (x[3] & x[4]) | (~x[1] & x[3]);
endmodule
七、Karnaugh map
- RTL代码
module top_module (
input [4:1] x,
output f
);
assign f = (~x[2] & ~x[4]) | (~x[1] & x[3]) | (x[2] & x[3] & x[4]);
endmodule
八、K-map implemented with a multiplexer
- RTL代码
module top_module (
input c,
input d,
output [3:0] mux_in
);
assign mux_in[0] = c | d;
assign mux_in[1] = 1'b0;
assign mux_in[2] = ~d;
assign mux_in[3] = c & d;
endmodule
- 仿真波形图
边栏推荐
猜你喜欢
随机推荐
【软考 系统架构设计师】软件架构设计⑦ 构件与中间件技术
五面阿里巴巴拿offer后定级P6:分享自己的面试经历
数据解析(XPath、BeautifulSoup、正则表达式、pyquery)
字符串函数、字符函数、内存函数的使用及其模拟实现
(7) FlinkSQL kafka data written to the mysql way 2
用 Antlr 重构脚本解释器
SQL INSERT INTO and INSERT INTO the SELECT statement
八月粉丝福利来了!大疆手机云台你爱了吗?
The use of qsort function and its analog implementation
自动当道,效率至上 | 快来解锁财务共享服务中心数字化秘籍
MeterSphere - open source test platform
The use of string function, character function, memory function and its analog implementation
The programmer essential VS debugging technique
(8) FlinkSQL custom UDF
leetcode 155. Min Stack最小栈(中等)
webgl 基础
使用.NET简单实现一个Redis的高性能克隆版(三)
[界面开发]DevExpress WinForms流程图控件——XtraDiagrams组件入门指南
(7)FlinkSQL将kafka数据写入到mysql方式二
逐步手撕轮播图3(分步教程)