Question

a. The diagram shows an 8-bit shifter that shifts its input one place to the left. Write a VHDL module for the shifter. B (7 down to 0) Lout A (7 down to 0

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

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;


entity shift_register is
port (
Clk : in std_logic; -- clock input
A : in std_logic_vector(7 downto 0);
Rin : in std_logic;
B : out std_logic_vector(7 downto 0);
Iout : out std_logic
);
end shift_register;


architecture behavioral of shift_register is
begin

process(Clk)  
begin
if (Clk'event and Clk = '1') then
B <= A(6 downto 0) & Rin;
Iout <= A(7);
end if;
end process;

end behavioral;

Add a comment
Know the answer?
Add Answer to:
a. The diagram shows an 8-bit shifter that shifts its input one place to the left....
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
  • Problem 8 (Lab, 20 points) (1) Write a VHDL module implementing a synchronous 16-bit counter. A...

    Problem 8 (Lab, 20 points) (1) Write a VHDL module implementing a synchronous 16-bit counter. A "reset signal resets the counter to 0. An "en" signal enables the counter modification. An "up signal indicates whether the counter must be incremented (1)/decremented (0). (2) The output of the module is the value of the signal, represented as 16 bits wide. Using output timing diagram to verify your coding results.

  • Please write the code in VHDL 1. An entity named reorder has an 8-bit std_logic_vector input...

    Please write the code in VHDL 1. An entity named reorder has an 8-bit std_logic_vector input and an 8-bit std logic_ vector output. The bits of the entity's output vector have the reverse order of the bits of its input vector. The architecture must use a single concurrent call to a function The function, named reorder_vec, is defined in the declaration section and returns a std_logic vector whose bits have the reverse order of the bits in the std_logic vector...

  • VHDL Using D-flip-flops, generate an 8-bit LFSR (Linear Feedbaclk Shift-Register). For every bit, include a Binary Cont...

    VHDL Using D-flip-flops, generate an 8-bit LFSR (Linear Feedbaclk Shift-Register). For every bit, include a Binary Control (BC) value that can turn the contribution of the flip-flop output to the XOR input on or off (1 for ON, 0 for OFF). For the 8-bit LFSR include a 7-bit ge- neric BIT_VECTOR that can configure contribution of LFSR flip-flops to the LFSR feedback. The right-most flip-flop output has no XOR, and the left-most flip-flop input is fed by the feedback line...

  • A specific type of bit-level manipulation consists in setting or clearing one single bit in a...

    A specific type of bit-level manipulation consists in setting or clearing one single bit in a multi-bit value, given its index and its new value. This operation can be implemented in hardware by a BitSet circuit with the following interface: Input x is a 4-bit value representing the original value. Output y is a 4-bit value representing the modified value, after the bit-set operation. Input index is a 2-bit value, ranging from 0 to 3, indicating the index of the...

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

  • Consider the circuit in Figure 1. It is a 4-bit (QQ2Q3) synchronous counter which uses four T-typ...

    Consider the circuit in Figure 1. It is a 4-bit (QQ2Q3) synchronous counter which uses four T-type flip-flops. The counter increases 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 signal low. You are to implement an 8-bit counter of this type Enable T Q Clock Clear Figure 1. 4-bit synchronous counter (but you need to implement 8-bit counter in this lab) Specific notes:...

  • You will use Quartus II to build an 8 bit arithmetic logic unit that performs the...

    You will use Quartus II to build an 8 bit arithmetic logic unit that performs the following functions: Control Value Function                                000 Copy In1 to theResult unchanged 001 Copy In2 to theResult unchanged 010 Add In1 to In2 011 Subtract In2 from In1 100 And In1 and In2 101 Or In1 and In2 110 Shift left In1 by 1 bit 111 Shift right In1 by 1 bit You are allowed to use either gates/logic schematic, or else Verilog. We suggest...

  • 1. Given the state diagram shown below for a state machine with one-bit input W and two-bit outpu...

    1. Given the state diagram shown below for a state machine with one-bit input W and two-bit output Z: a. (20 points) Using the state assignments below, make the state-assigned table. Let S0 = 001, S1 = 010, and S2 = 100. b. (20 points) Let the state variables be Y2, Y1, and Y0. Derive an expression for each of the next state variables. c. (10 points) Derive expressions for the output of this state diagram. d. (20 points) Draw...

  • FIRST ACTIVITY: (100/100) . SIMPLE 4-BIT ARITHMETIC LOGIC UNIT (ALU): This circuit selects between arithmetic (absolute...

    FIRST ACTIVITY: (100/100) . SIMPLE 4-BIT ARITHMETIC LOGIC UNIT (ALU): This circuit selects between arithmetic (absolute value, addition) and logical (XOR, AND) operations. Only one result (hexadecimal value) can be shown on the 7-segment display This is selected by the input sel (1..0) B A-BI A+B A xnor B A nand B Input EN: If EN-1result appears on the 7 segment display. If EN=0 → all LEDs in the 7 segment display are off Arithmetic operations: The 4-bit inputs A...

  • 3. [20 pts] 8-segment decoder for 8 symbols. Implement (draw logic diagram) the segment 4 of the 8-segment decoder...

    3. [20 pts] 8-segment decoder for 8 symbols. Implement (draw logic diagram) the segment 4 of the 8-segment decoder for 8 symbols 0 (a) Using K-map to realize the function q 16 pts) (b) Using a 3-8 decoder and OR gates to realize the function q.[7 pts] (e Using 8-to-1 multiplexer to realize the function 17 pts] Notes: 1. A eight-segment decoder is a combinational circuit with a three-bit input a and a 8-bit output q. Each bit of q...

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