学习阶段:有问题发873727286@qq.com大家一起讨论。
题干:Implement the circuit described by the Karnaugh map below.
题目分析:对卡诺图进行化简可得:
答案:
module top_module(
input a,
input b,
input c,
output out );
assign out = a | b | c ;
endmodule
题目大意:与上题相同,均为卡诺图化简。
答案:
module top_module(
input a,
input b,
input c,
input d,
output out );
assign out = (~b & ~c)|( ~a & ~d)|(b & c & d)|(a & c & d);
endmodule
题目大意:与上题相同,均为卡诺图化简。
答案:
module top_module(
input a,
input b,
input c,
input d,
output out );
assign out = a | (~b & c);
endmodule
题目大意:与上题相同,均为卡诺图化简。
答案:
module top_module(
input a,
input b,
input c,
input d,
output out );
assign out = a^b^c^d;
endmodule
题干:A single-output digital system with four inputs (a,b,c,d) generates a logic-1 when 2, 7, or 15 appears on the inputs, and a logic-0 when 0, 1, 4, 5, 6, 9, 10, 13, or 14 appears. The input conditions for the numbers 3, 8, 11, and 12 never occur in this system. For example, 7 corresponds to a,b,c,d being set to 0,1,1,1, respectively.
Determine the output out_sop in minimum SOP form, and the output out_pos in minimum POS form.
题目大意:具有四个输入(A、b、c、d)的单输出数字系统在输入上出现2、7或15时生成逻辑 1,在出现0、1、4、5、6、9、10、13或14时生成逻辑 0。数字3、8、11和12的输入条件在此系统中从未出现。out_sop 用最小项输出,out_pos 用最大项输出。
题目分析:根据题干画出卡诺图,然后化简卡诺图。
module top_module (
input a,
input b,
input c,
input d,
output out_sop,
output out_pos
);
assign out_sop = ( c & d )|( c & ~a & ~b );
assign out_pos = ~(( ~c ) | ( b & ~d ) | (a & ~ d));
endmodule
题目大意:与题75相同,均为卡诺图化简。
题目分析:卡诺图化简入下图所示,可得: out = (x3 & ~x1)|(x4 & x2);
答案:
module top_module (
input [4:1] x,
output f );
assign f = (x[3] & ~x[1])|(x[4] & x[2]);
endmodule
题目大意:与题78相同,均为卡诺图化简。可以用POS和SOP两种形式实现。
题目分析:SOP下图所示,可得: out = ( ~ x[2] & ~ x[4]) | (~x[1] & x[3]) | (x[2] & x[3] & x[4]);
POS如下图所示,可得:
out = ~ ((x[2] & ~ x[3]) | (~x[3] & x[4]) | (x[1] & ~x[2] & x[4] ) | (x[1] & x[2] & ~x[4]));
答案:
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]);
//assign f = ~((x[2] & ~x[3]) | (~x[3] & x[4]) | (x[1] & ~x[2] & x[4] ) | (x[1] & x[2] & ~x[4]));
endmodule
题干:For the following Karnaugh map, give the circuit implementation using one 4-to-1 multiplexer and as many 2-to-1 multiplexers as required, but using as few as possible. You are not allowed to use any other logic gate and you must use a and b as the multiplexer selector inputs, as shown on the 4-to-1 multiplexer below.
You are implementing just the portion labelled top_module, such that the entire circuit (including the 4-to-1 mux) implements the K-map.
题目大意:对于下面的卡诺图,使用一个4-to-1多路复用器和的2-to-1多路复用器的电路实现,但使用尽可能少的多路复用器。不允许使用任何其他逻辑门,必须使用a和b作为多路复用器选择器输入,如下面的4对1多路复用器所示。
但本题所要实现的部分并不是整个卡诺图,而是图2所示的电路。我们设计的电路和后面的4选1数据选择器共同构成卡诺图。
题目分析:此题可以拆开来看,当ab对应 00 时,当cd不全为0时,对应mux_in[0]输出1,其余为0。依此类推:
当ab 为 01时,无论cd为何值对应mux_in[1]输出0。当ab 为 10 时,只有cd全为1时,对应mux_in[2]输出1,当ab 为 11时,只有d不为0时,对应mux_in[1]输出0。依此逻辑写出对于cd的数据选择器。
利用三目运算符解决问题。
答案:
module top_module (
input c,
input d,
output [3:0] mux_in
);
assign mux_in[0] = c ? 1 :(d ? 1 : 0); //题目要求不能使用逻辑门
assign mux_in[1] = 1'b0 ; //恒为0
assign mux_in[2] = d ? 0 : 1 ; //这表示说~d时,结果才为1
assign mux_in[3] = c ? (d ? 1 : 0) : 0;//cd都为真时,取值为1
endmodule
因篇幅问题不能全部显示,请点此查看更多更全内容