Question

4.9. Write the VHDL code for a 4-bit register. Inputs: clk,enable, data; ouput:q.

4.9. Write the VHDL code for a 4-bit register. Inputs: clk,enable, data; ouput:q.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
library ieee;
use ieee.std_logic_1164.all;
entity pipo is
port(
clk : in std_logic;
D: in std_logic_vector(3 downto 0);
Q: out std_logic_vector(3 downto 0)
);
end pipo;
architecture arch of pipo is
begin
process (clk)
begin
if (CLK'event and CLK='1') then
Q <= D;
end if;
end process;
end arch;
Add a comment
Know the answer?
Add Answer to:
4.9. Write the VHDL code for a 4-bit register. Inputs: clk,enable, data; ouput:q.
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
  • 1 Simulations to verify a 4-bit Register Simulate and verify a 4-bit Register using behavioral VHDL...

    1 Simulations to verify a 4-bit Register Simulate and verify a 4-bit Register using behavioral VHDL code in ModelSim. Recall that sequential circuits depend on both present and past state. Sequential circuits are in contrast to combinational circuits, which depend on input values from only the present state. Fur- thermore, recall that a flip-flop is a fundamental circuit used to create more complex sequential circuits. A register is an array of storage components, such as flip-flops. For example, a 4-bit...

  • 2. A 4-bit parallel in/serial out shift register has SHIFT/LOAD' and CLK inputs as shown in...

    2. A 4-bit parallel in/serial out shift register has SHIFT/LOAD' and CLK inputs as shown in the figure below. What is the output Q3 at the two times('A' followed by 'B') indicated by the dashed lines in the figure below if the parallel data inputs are DO-1, D1-0, D2-1, and D3-1? D3 SHIFT/L CLK SHIFT /LOAD Ο A. A-0,9:0 B. A:0, B-1 D.A-1, B-1

  • 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;...

  • 8. Write a complete VHDL code for the 4-bit counter shown below. Reset synchronously returns the...

    8. Write a complete VHDL code for the 4-bit counter shown below. Reset synchronously returns the output state to 1010. The counting is synchronized to the rising edge of Clk. Reset 1010 0010 1110 1011

  • 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,...

  • Write a VHDL code using processes for the following logic circuit which include a shift register...

    Write a VHDL code using processes for the following logic circuit which include a shift register and 4x1 multiplexer. Use the entity below.              entity registers_min_max is port( din   : in std_logic_vector(3 downto 0);       reset : in std_logic;       clk   : in std_logic;       sel   : in std_logic_vector(1 downto 0);       reg_out : out std_logic_vector(3 downto 0)); end registers_min_max; din reset RO clk reset R1 A C clk reset R2 clk reset R3 clk 3 0 sel LE

  • 6. (20%) Write HDL code to synthesize the following circuits: a. 8-bit register. b. 9-bit Register...

    6. (20%) Write HDL code to synthesize the following circuits: a. 8-bit register. b. 9-bit Register with Asynchronous Reset c. N-bit Register with Synchronous Reset where N is a parameter d. N-bit register with Enable and Asynchronous reset where N is a parameter e. 8-bit latch

  • 4. Design a 4-bit Adder / Subtractor. Follow the steps given below. (a) Write the VHDL...

    4. Design a 4-bit Adder / Subtractor. Follow the steps given below. (a) Write the VHDL code for a 1-bit Full Adder. The VHDL code must include an entity and an architecture. (b) Draw the circuit diagram for a 4-bit Adder / Subtractor. The circuit diagram may include the following logic elements: 1-bit Full Adders (shown as a block with inputs and outputs) Any 2-input logic gates Multiplexers Do not draw the logic circuit for the 1-bit Full Adder.

  • 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...

  • 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...

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
ADVERTISEMENT