HDL bits----circuits----karnaugh map to circuits

文章详细描述了多个逻辑设计模块,包括KMaps(查找表)如kmap1至kmap4,以及SOP(SumofProducts,和项之和)和POS(ProductofSums,积项之积)转换的实例。这些模块展示了基本的逻辑运算和组合逻辑设计方法。

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

1.kmap1

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

2.kmap2

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

3.kmap3

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

4.kmap4

(记住对应的图和表达式)

module top_module(
    input a,
    input b,
    input c,
    input d,
    output out  ); 
    assign out = a^b^c^d;
endmodule

5.Exams/ece241 2013 q2

SOP形式是找出所有当输出为1(最小项)的输入组合(乘积和)
POS则是找出所有当输出为0(最大项)的输入组合(和乘积)
烙铁 我不会写pos啊

该电路的SOP和POS必须均为化简后的最小值

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 = (~a & ~b & c) | (b & c & d) | (a & c & d);
endmodule

6.Exams/m2014 q3

module top_module (
    input [4:1] x, 
    output f );
    assign f=((~x[1])&x[3])|(x[2]&x[4]&(~x[3]));
endmodule

7.Exams/2012 q1g

module top_module (
    input [4:1] x,
    output f
); 
    assign f=((~x[1])&x[3])|((~x[4])&(~x[2]))|(x[1]&x[2]&x[3]&x[4]);
endmodule

8.Exams/ece241 2014 q3

module top_module (
    input c,
    input d,
    output [3:0] mux_in
); 
    assign mux_in[0]=((~c)&d)|(c&d)|(c&(~d));
    assign mux_in[1]=0;
    assign mux_in[2]=((~c)&(~d))|(c&(~d));
    assign mux_in[3]=c&d;
endmodule

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值