FPGA(150)
-
Bugs case
Problem Statement 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 [7:0] code, output reg [3:0] out, output reg valid );//..
2023.06.20 -
Exams/ece241 2013 q7
Problem Statement A JK flip-flop has the below truth table. Implement a JK flip-flop with only a D-type flip-flop and gates. Note: Qold is the output of the D flip-flop before the positive clock edge. module top_module ( input clk, input j, input k, output Q); always @(posedge clk)begin if(j == 0 && k == 0) Q
2023.06.19 -
Exams/ece241 2014 q4
Problem Statement Given the finite state machine circuit as shown, assume that the D flip-flops are initially reset to zero before the machine begins. Build this circuit. module top_module ( input clk, input x, output z ); reg Q_1 = 1'b0; reg Q_2 = 1'b0; reg Q_3 = 1'b0; wire xor_gate; wire and_gate; wire or_gate; always @(posedge clk)begin xor_gate = x ^ Q_1; Q_1
2023.06.19 -
Exams/2014 q4a
Problem Statement Consider the n-bit shift register circuit shown below: Write a Verilog module named top_module for one stage of this circuit, including both the flip-flop and multiplexers. module top_module ( input clk, input w, R, E, L, output Q ); wire out_mux1; wire out_mux2; assign out_mux1 = E ? w : Q; assign out_mux2 = L ? R : out_mux1; always @ (posedge clk)begin Q Q출력을 out_mux1의 조건문으로 ..
2023.06.19 -
Mt2015 muxdff
Problem Statement Taken from ECE253 2015 midterm question 5 Consider the sequential circuit below: Assume that you want to implement hierarchical Verilog code for this circuit, using three instantiations of a submodule that has a flip-flop and multiplexer in it. Write a Verilog module (containing one flip-flop and multiplexer) named top_module for this submodule. module top_module ( input clk, i..
2023.06.19 -
Exams/m2014 q4b
Problem Statement Implement the following circuit: module top_module ( input clk, input d, input ar, // asynchronous reset output q); always @(posedge clk or posedge ar) begin if(ar) q = 1'b0; else q = d; end endmodule
2023.06.19