Question

(15 points) Your colleague is trying to code a VHDL model for a 7419 register. Review the code on the next page and make any
Problem grading: for each appropriate fix, you receive a point; for each lose a point, where maximum number of point mber of
0 0
Add a comment Improve this question Transcribed image text
Answer #1

soluion;:

given data:

The code have been corrected for errors and given below

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
-- Entity Definition starts here
entity e74194 is
port (S1, S0, Clrn, RSIN, LSIN, clk : in std_logic; D: in std_logic_vector (3 downto 0); -- All th input ports are declared here
       Qout: out std_logic_vector (3 downto 0)); -- The output port is declared here
end e74194;

architecture Behavioral of e74194 is
signal Q: std_logic_vector (3 downto 0):= "0000"; -- internal storage declared here
begin
process (Q, S1, S0, clk, Clrn)
subtype slv2 is std_logic_vector(1 downto 0); -- subtype declared for using it in the case statement
begin
If Clrn = '0' then -- if clrn = 0 the internal storage should be cleared
   Q <= "0000";
elsif (clk'event and clk = '1') then -- during the positive edge of the clock signal the case statement will get executed
   case slv2'(S1 & S0) is -- Here checks the value of S1 and S0
   when "00" => null; -- when it is 00, the internal storage should hold the previous content
   when "01" => Q(3) <= RSIN; Q(2 downto 0) <= Q(3 downto 1); -- when it is 01, a right shift should occur
   when "10" => Q(0) <= LSIN; Q(3 downto 1) <= Q(2 downto 0); -- when it is 10, a left shift should occur
   when "11" => Q <= D; -- when it is 11, parallelly load a new data on to the internal storage
   when others => null; -- in all other cases, it should hold previous value
   end case; -- end of the case statement
end if; -- end of the if statement
Qout <= Q; -- assign output signal with internally stored value
end process; -- end of the process block

end Behavioral; -- end of the entity definition

The Screeshot of the code is given below for better readability.

library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.numeric_std.ALL; -- Entity Definition starts here entity e74194 is port (

The simulation result of the VHDL code is given below.

/e/4194/s1 /e74194/50 /e74194/drn /e74194/rsin /e74194/sin /e74194/dk /e74194/d e74194/qout 1110 0110 10000 10110 1 110010000

please give me humb up

Add a comment
Know the answer?
Add Answer to:
(15 points) Your colleague is trying to code a VHDL model for a 7419 register. Review...
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
  • 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,...

  • Design a 3- bit Multipurpose Register. The register utilizes 3 "D" type flip flops with outputs...

    Design a 3- bit Multipurpose Register. The register utilizes 3 "D" type flip flops with outputs Q0, Q1, Q2. The Registers has a synchronous clock input(CLK) that clocks all 3 flip flops on its positive edge The Registers has an asynchronous clear input(CLR' ) that sets all flip flops to "0" when active low. The Register has 2 select inputs, S0 and S1 that selects the functions as folows: S1 = 0, 0, 1, 1 and S0 = 0,1,0,1 and...

  • Question #5 (3 marks): The content of a 4-bit register is initially 1001. The register is...

    Question #5 (3 marks): The content of a 4-bit register is initially 1001. The register is shifted six times to the right, with the serial input (SI) being 010010. What is the content of the register after each shift? --------- --------- Serial in (SI) Serial in (SI) NO D1Q1 - D 2 Q2 Io D3 03 _ Dr D3 Q3 DO QO Serial out (SO) CE CE HCE LACE 1 Shift Clock - Q3 Q2 Q1 QO 1 0 0...

  • 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

  • Instructions: For all the questions you are required to submit VHDL codes & test bench simulation...

    Please answer both questions Instructions: For all the questions you are required to submit VHDL codes & test bench simulation screenshot. If anything else is required it is mentioned in the question. Question 1.Design a 16 bit Increment Register with asynchronous reset, and increment capability using the following entity. Also, find out number of registers inferred by your code Entity reg16 is port ( clk, reset, inc load datain in stdalogic. in stdalogic. instdlogic vector (15 downto 0) out td.logicvector...

  • 2. Serial shift registers Draw missing connections to implement various shift registers 1. Shift right: All...

    2. Serial shift registers Draw missing connections to implement various shift registers 1. Shift right: All bits of the register move right by one position, and a new bit value from a serial input is stored in the most significant bit (leftmost flip-flop below). Serial input -02 az 02 a Do ao Serial indino 2. Shift left: All bits of the register move left by one position, and a new bit value from a serial input is stored in the...

  • Problem 7. Consider the 74x194 4-bit bidirectional universal shift register shown below Determine the operation of...

    Problem 7. Consider the 74x194 4-bit bidirectional universal shift register shown below Determine the operation of this circuit by filling out the table. Assume that the register is cleared initially as indicated by the first row in the table, and then connected to +5V (before time t), as shown in schematic. Also assume that t 'is that time at which a positive edge occurs in the input signal 'clock'. Si and S0 inputs (given) are used to switch between modes...

  • 1 Implement a bit 3 bit binary up counter using positive edge triggered D FF. 2...

    1 Implement a bit 3 bit binary up counter using positive edge triggered D FF. 2 Design a 1001 sequence detector with D FF (Mealy model). 3 Design a 1001 sequence detector with D FF (Moore model). 4 Design a 4 bit universal shift register using D Flip Flops and MUX that implements the following functionality. S1 S0 Function 0 0 Shift Right 0 1 Hold 1 0 Load Value Parallelly 1 1 Shift Left

  • I am making a 4-bit universal shift register that can perform right shift, left shift, and...

    I am making a 4-bit universal shift register that can perform right shift, left shift, and parallel loading using 4-to-1 multiplexers in VHDL. I keep getting red lines for u3, u2, u1, u0. The error says the following below. What is wrong with my code? How can I fix it? librarviees, use ieee.std_logic_1164.all; entity uni shift.reg.is porti 1 : in std. Jogis vector (3 downto.0); I, w, clock : in std logici 9: buffer std. Jogis vector (3 downto 0));...

  • Using Structural Modeling in VHDL write the code for: An Arithmetic Logic Unit (ALU) shown in...

    Using Structural Modeling in VHDL write the code for: An Arithmetic Logic Unit (ALU) shown in the figure below. A (16-bit), B (16-bit), Opcode (3-bit), and Mode (1-bit) are the inputs; and ALUOut (16-bit) and Cout (1-bit) are the outputs of the design. A and B hold the values of the operands. Mode and Opcode together indicate the type of the operation performed by ALU. The ALU components ARE: -Arithmetic Unit that consists of one 16-bit adder, 16-bit subtractor, 16-bit...

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