GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

Fill in the VHDL to implement the illustrated circuit. Assum…

Fill in the VHDL to implement the illustrated circuit. Assume that clk and rst connect to every register in the schematic. All wires/operations are width bits except for in4, which is a single bit. Ignore adder overflow. Assume the mux selects the left input when in4 = ‘1’. Use the next page if necessary.   — Write code in specified regions creating the diagram used above –library ieee;use ieee.std_logic_1164.all;use ieee.numeric_std.all;entity diagram is       generic (width : positive := 8);       port(              clk, rst : in std_logic;              in1, in2, in3 : in std_logic_vector(width-1 downto 0);              in4 : in std_logic;              out1, out2 : out std_logic_vector(width-1 downto 0));end diagram;architecture BHV of example is  –Region 1: Write code below initializing any signals here–begin process(clk, rst)      begin — Region 2: Write code —           elsif (rising_edge(clk)) then  — Region 3: Write Code —                      end if;  end process;– Region 4: Write Code –end BHV;

Read Details

A single assignment to all outputs at the beginning of a pro…

A single assignment to all outputs at the beginning of a process for combinational logic will guarantee there are no latches for that logic

Read Details

Fill in the following code for the behavioral architecture o…

Fill in the following code for the behavioral architecture of an ALU using the numeric standard library. Write the correct code for each region as specified by the comments around regions. library ieee;use ieee.std_logic_1164.all;use ieee.numeric_std.all;entity example is       generic (width : positive := 4); –width will ALWAYS be even       port (             in1      : in std_logic_vector(width-1 downto 0);             in2      : in std_logic_vector(width-1 downto 0);             sel      : in std_logic_vector(1 downto 0);             out1     : out std_logic_vector(width-1 downto 0);             out2    : out std_logic_vector(width-1 downto 0);             overflow : out std_logic       );end example;architecture BHV of example isbegin                  — REGION 1: Write what goes in the process list below —       process(    )             –variables list – no need to write anything here             variable temp_add  : unsigned(width downto 0);             variable temp_mult : unsigned(2*width-1 downto 0);       begin             — REGION 2: Initialize any signals below —                       case sel is                            –for region 3 compare: if in1 greater than in2 subtract in1 by in2                      –if not add and set the overflow bit as width. set both outputs in out1                    when “00” => — REGION 3: Write code below —                      –for region 4 compare: if in1 is equal to “1111” then ‘and’ in1 and in2 and set the result to out1.                      –Then elsif in2 is equal to “0000” then ‘or’ in1 and in2 and set the result to out2                      — You can assume the width is 4 he and if neither true, set out2 to in1                    when “01” =>                         — REGION 4: Write code below –-                             –multiply: store high bits in out2 and low bits in out1. keep in mind, the width generic                 –will always be even (no need to account for an extra bit on out out1 or out2)                    when “10” =>                         — REGION 5: Write code below –-                                             –create the last when statement that accounts for all other cases and set out1 to 0              — REGION 6: Write code below —             end case;                   end process;end BHV;

Read Details

Which compound or compounds contain both ionic and molecular…

Which compound or compounds contain both ionic and molecular bonds? (i) K3N; (ii) PH3; (iii) NaClO2; (iv) ClO2; (v) AlF3

Read Details

In the reaction shown below, how much of 1.15 M solution of…

In the reaction shown below, how much of 1.15 M solution of AgNO3 is needed to completely react with 0.421 mol of magnesium chloride according to the equation: MgCl2(aq) + 2 AgNO3(aq) → Mg(NO3)2(aq) + 2 AgCl(s)

Read Details

Compounds listed below were mixed with water.  Which solutio…

Compounds listed below were mixed with water.  Which solution(s) will not conduct electricity well? (i) NaCl (ii) NCl3 (iii) KCl (iv) BaCl2 (v) Pb(Cl)2

Read Details

Suppose you approximating the solution of a simple different…

Suppose you approximating the solution of a simple differential equation involving the function , and you appeal to the relation

Read Details

TRUE or FALSE? A  fixed-increment simulation clock is well-s…

TRUE or FALSE? A  fixed-increment simulation clock is well-suited for simulations that model continuous-time systems such as the movement of an approaching weather system.

Read Details

There are 5 random people in a room.  What is the probabilit…

There are 5 random people in a room.  What is the probability that at least two of them share the same birthday?  (Assume 365 days are equally likely.)

Read Details

Suppose that and are i.i.d. random variables. How would y…

Suppose that and are i.i.d. random variables. How would you simulate a discrete uniform random integer between 1 and 12 (e.g., a 12-sided die toss)?

Read Details

Posts pagination

Newer posts 1 … 42,141 42,142 42,143 42,144 42,145 … 67,718 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top