FPGA(150)
-
Edgedetect
For each bit in an 8-bit vector, detect when the input signal changes from 0 in one clock cycle to 1 the next (similar to positive edge detection). The output bit should be set the cycle after a 0 to 1 transition occurs. Here are some examples. For clarity, in[1] and pedge[1] are shown separately. module top_module ( input clk, input [7:0] in, output [7:0] pedge ); wire [7:0] data; always @(pose..
2023.06.26 -
Exams/ece241 2014 q3
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..
2023.06.26 -
Exams/2012 q1g
Consider the function f shown in the Karnaugh map below. Implement this function. (The original exam question asked for simplified SOP and POS forms of the function.) module top_module ( input [4:1] x, output f ); assign f = (~x[1] & x[3]) | (~x[2] & ~x[4]) | (~x[2] & ~x[4]) | (x[1] & x[2] & x[3] & x[4]); endmodule
2023.06.26 -
Exams/m2014 q3
Consider the function f shown in the Karnaugh map below. Implement this function. d is don't-care, which means you may choose to output whatever value is convenient. module top_module ( input [4:1] x, output f ); assign f = (~x[1] & x[3]) | (x[1] & x[2] & ~x[3] & x[4]); endmodule
2023.06.26 -
Bcdadd4
You are provided with a BCD (binary-coded decimal) one-digit adder named bcd_fadd that adds two BCD digits and carry-in, and produces a sum and carry-out. module bcd_fadd ( input [3:0] a, input [3:0] b, input cin, output cout, output [3:0] sum ); Instantiate 4 copies of bcd_fadd to create a 4-digit BCD ripple-carry adder. Your adder should add two 4-digit BCD numbers (packed into 16-bit vectors)..
2023.06.26 -
Adder100
Create a 100-bit binary adder. The adder adds two 100-bit numbers and a carry-in to produce a 100-bit sum and carry out. module top_module( input [99:0] a, b, input cin, output cout, output [99:0] sum ); assign {cout, sum} = a+b+cin; endmodule
2023.06.26