Question

Implement an 8 bit register in VHDL/Verilog using Model Sim software. Show two test cases for...

Implement an 8 bit register in VHDL/Verilog using Model Sim software. Show two test cases for data read and write into the register.

The register has an enable and reset signal. When the reset is high the register should be cleared. When the enable is high and reset is low, data should be written into the register.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANSWER :

file dff.v

module dff(
input clk,reset,enable,d,
output reg Q
);
always@(posedge clk)
begin
if(reset)
Q <=0;
else if(enable)
Q <=d;
end

endmodule

file 8_bit_reg,v

module register(
input [7:0] in,
input clk,
output [7:0] out
  
);

dff u[7:0](clk,0,1,in,out);

endmodule

PLEASE LEAVE A THUMBS UP IF THIS ANSWER HELPS YOU.

THANK YOU:)

Add a comment
Know the answer?
Add Answer to:
Implement an 8 bit register in VHDL/Verilog using Model Sim software. Show two test cases for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Assignment: Implement an 8 bit register in VHDL/Verilog using Model Sim software. Show two test cases...

    Assignment: Implement an 8 bit register in VHDL/Verilog using Model Sim software. Show two test cases for data read and write into the register. The register has an enable and reset signal. When the reset is high the register should be cleared. When the enable is high and reset is low, data should be written into the register. Hint: The demo code shown below has the implementation for a 4-bit register that can be used as an example. library ieee;...

  • Lab 7: Design a 4 bit register in VHDL. The register file has a synchronous load...

    Lab 7: Design a 4 bit register in VHDL. The register file has a synchronous load signal and an asynchronous reset. When the reset signal is high the register file should be cleared. The input is stored only when the load and clock signal is high. 

  • I need help doing the code using Verilog modelsim Design a 32-bit register using the D...

    I need help doing the code using Verilog modelsim Design a 32-bit register using the D Flip-Flop from part (1) so that it has the following features: (a) The Register has these ports Outputs: Q[31:0] Inputs: D[31:0] CLK is the clock signal EN is a synchronous signal for enabling the register. When EN is asserted at the sensitive edge of the CLK, the input D is loaded into the register. RESET We will leave this input unconnected, but will define...

  • Use the Quartus Prime Text Editor to implement a structural model of the 4-bit data register show...

    Use the Quartus Prime Text Editor to implement a structural model of the 4-bit data register shown above in a file named reg_4bit.sv. Specify the 4-bit data register’s module according to the interface specification given in the table below. Port Mode Data Type Size Description RST in logic 1-bit Active high asynchronous reset CLK in logic 1-bit Synchronizing clock signal EN in logic 1-bit Synchronous clock enable D in logic vector 4-bits Synchronous data input Q out logic vector 4-bits...

  • Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter load...

    Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter loads the "0000" state if reset is low. The counter should start and end with this state. Write a testbench to verify the correctness of the 4-bit Johnson counter. The testbenclh should have a clock with a period of 20ns and a reset signal. The testbench should store the 4-bit binary outputs of the counter in a file, which will be used to provide...

  • VHDL structural code please Design an 8-bit add/subtract in Verilog AND VHDL using any of the...

    VHDL structural code please Design an 8-bit add/subtract in Verilog AND VHDL using any of the coding styles and language features covered so far in modules 8 and 9. When AS Sel0 it performs an addition, else when AS Sel 1 it performs a subtraction. OpA and OpB are assumed to be signed, 2's-Complement numbers. Hint: Bit-wise XOR AS Sel with OpB before adding it to OpA- see lecture notes Op87.0Add/ Subtract Vout

  • in VHDL Show synthesizable VHDL code for a register unit that performs operations shown below. The unit has a 3-bit mod...

    in VHDL Show synthesizable VHDL code for a register unit that performs operations shown below. The unit has a 3-bit mode (md) input, an asynchronous reset (rs) input, a 1-bit output control (oc) input, and an 8-bit bi-directional io bus. The internal register drives the io bus when oc is ‘I, and md is not “11 1". Use std-logic. md-000: does nothing md-001: right shift the register md-010: left shift the register md 011: up count, binary md-100: down count,...

  • Vhdl language PROJECT REQUIREMENT Design 8*8 bit signed multiplier A*B circuit using Booth Multiplier (you will...

    Vhdl language PROJECT REQUIREMENT Design 8*8 bit signed multiplier A*B circuit using Booth Multiplier (you will learn about this in the course). . A and B are 8-bits signed numbers. . The operands A and B must be written into registers RA and RB on the negative edge of the LOAD flag. Output of the multiplier is a 16 bit register Z . The project must be written in structural VHDL mode, Each component Implementation and simulation details should be...

  • Write a Verilog model of a circuit whose 8-bit output is formed by shifting its 8-bit...

    Write a Verilog model of a circuit whose 8-bit output is formed by shifting its 8-bit input one position to the right and filling the vacant positions with the bit that was in the MSN before the shift occurred (shift arithmetic right). Write a test bench and simulate the circuit. Please Implement the exercises and comments for each line Thank you.

  • please give the verilog code and explain in the form of comments. Part I Consider the...

    please give the verilog code and explain in the form of comments. Part I Consider the circuit in Figure 1. It is a 4-bit synchronous counter (text Section 5.9.2) that uses four T-type flip- flops (text Section 5.5). The counter increments its value on each positive edge of the clock if the Enable signal is asserted. The counter is reset to 0 by setting the Clear b signal low - it is an active-low asynchronous clear. You are to implement...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT