1.
ANSWER:
GIVEN THAT:
WRITING A VERILOG MODULE PROGRAM:
THE CODEING FOR 2 INPUT LOGIC AND GATE:
module myAnd(a,b,y);
input a,b; //input declaration and each are 1 bit
output wire y; //output y and it is also 1 bit
assign y=a&b;
endmodule
2.
WRITING THE TEST BENCH PROGRAM:
module myAnd_tb;
reg a,b;
wire y;
myAnd z1(a,b,y); //module instantiation of and logic gate
initial
begin
#10 a=0;b=0;
#10 a=0;b=1;
#10 a=1;b=0;
#10 a=1;b=1;
end
endmodule
3.
THE SCREENSHOTS OF THE SOURCE CODE:
THE OUTPUT WAVE FROM:
1. Write a Verilog module called myNot to implement the logic NOT gate. 2. Write a...
Write a test bench to thoroughly test the Verilog module dff_fe_asyn_h. below is the module ddff_fe_asyn_h.code Simulate the circuit using ISim and analyze the resulting waveform. Verilog Code for dff_fe_asyn_h is mentioned below:- //DFF module with asynchronous active high reset with negative edge trigger with clock module dff_fe_asyn_h ( input clock, // Clock Input input reset, // Reset Input input data_in, // Input Data output reg data_out // Output Data ); always @ (negedge clock or posedge reset) // triggers...
Verilog! NOT VHDL Please (4 pts) Write a behavioral Verilog module to implement a counter that counts in the following sequence: 000, 010, 100, 110, 001, 011, 101, 111, (repeat) 000, etc. Use a ROM and D flip-flops. Create a test bench for your counter design and run functional simulation in ModelSim. (4 pts) Write a behavioral Verilog module to implement a counter that counts in the following sequence: 000, 010, 100, 110, 001, 011, 101, 111, (repeat) 000, etc....
a) Write a Verilog module that implements a 1-bit partial full adder (PFA). b) Through instantiating the module in a) plus other logic, implement a 4-bit full adder with Verilog. c) Write a proper test-bench and stimulus, thoroughly test your 4 bit carry lookahead adder. d) Show a waveform snapshot that indicates you adder can correctly compute 0101 + 1101 and show your results.
Task (10 points): (1) Approach 1: Implement a 4-to-16-line decoder using the schematic capture feature of Xilinx ISE. On the schematic, add a text that clearly shows your name and eRaider ID. (2) Approach 2: Write and compile a 4-to-16-line decoder Verilog gate-level description. (3) Approach 3: Write and compile a 4-to-16-line decoder Verilog behavioral description. (4) Create an appropriate test file to do an exhaustive test. Exhaust all the possible input codes in 3 the following order: 0000 →...
Consider a finite state machine with a control input called mode. When mode = 0, the machine operates as a mod-3 down counter, where the outputs are the count values. When mode = 1, the machine's output progresses through 1133 number (1 digit per clock cycle). Complete each of the steps which follow. (a) Draw the state diagram for this machine. (b) Write RTL Verilog code which implements this design. Submit your printed source code by the due date and...
Write a VHDL code to implement the circuit function described below. Student Id : 8123405 Last 4 digits : 3405 6. Write a VHDL code to implement the circuit function described below The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal DIR: Direction of the display sequence, T-forward, Ό'-reverse. CLK: clock pulse for the display sequence. RST:...
Write a VHDL code to implement the circuit function described below. 6. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal. DIR: Direction of the display sequence, '1 CLK: clock pulse for the display sequence RST: reset the display counter. forward, '0' - reverse. Student ID: 8480594 Vdd ABCDE F G DIR CLK RST For example, if...
Write a VHDL code to implement the circuit function described below. 6. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal. DIR: Direction of the display sequence, '1 CLK: clock pulse for the display sequence RST: reset the display counter. forward, '0' - reverse. Student ID: 8243416 Vdd ABCDE F G DIR CLK RST For example, if...
6. Write a VHDL code to implement the circuit function described below. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal DIR: Direction of the display sequence, '1'forward, '0'- reverse. CLK: clock pulse for the display sequence. RST: reset the display counter Student ID-8860729 Vdd ABC|DEFG DIR CLK RST For example, if your ID number is 1234567,...
Write a Verilog program to implement and test a subtractor. The program should have three modules. The first module, called cfulladder implements a one bit subtractor with two 1-bit outputs, S and Cout, and three one bit inputs A, B, Cin. You have to use always keyword to implement this combinational circuit. The second module, called sub4 implements a four bit subtractor by instantiating 4 cfulladder modules. It has the same inputs and outputs but now the S, A, and...