Question

entity one is end; architecture a of one is type arr is array(0 to 7) of...

entity one is
end;

architecture a of one is
  type arr is array(0 to 7) of bit_vector (2 downto 0);
  signal a : arr := ("000", "001", "010", "011", "100", "101", "110", "111");
  signal x : bit_vector (2 downto 0);
  signal y : bit;
  begin
    y <= x(0) and x(2); 
    process
      begin
         for i in 0 to 7 loop
            x <= a(i);
            wait for 1 ns;
            report bit'image(y);
          end loop;
        wait;
      end process;
end;

The output y is taken from the bit_vector x, and the bit_vector x is taken from one of the rows the (8x3) array a().

This module output y is a sequence 00000101000000101 where the bit times are 1 ns each. Modify this module (by changing just one line) to generate the sequence 0000001100000011. (In both cases the pattern period of 8-bits is the same.)

Homework Answers

Answer #1

the code for the change in output is given below:

entity one is
end;

architecture a of one is
  type arr is array(0 to 7) of bit_vector (2 downto 0);
  signal a : arr := ("000", "001", "010", "011", "100", "101", "110", "111");
  signal x : bit_vector (2 downto 0);
  signal y : bit;
  begin
    y <= x(1) and x(2); -- x(0) is chnages to X(1) since we wantthe output 1 at 6-7 only hence 110 and 111 rest are 000 001 010 011(the first two bits wont give an output one for the change
    process
      begin
         for i in 0 to 7 loop
            x <= a(i);
            wait for 1 ns;
            report bit'image(y);
          end loop;
        wait;
      end process;
end;
Know the answer?
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
Similar Questions
Given the following State Transition Table, the starting state 111, and the input sequence 0, 0,...
Given the following State Transition Table, the starting state 111, and the input sequence 0, 0, 0, 0, 1. Please enter the 5 bit Output (Y) sequence and the state sequence in the spaces provided. Present In Next Out ABC X A+,B+,C+ Y 000 0 000 1 000 1 010 0 001 0 100 0 001 1 001 1 010 0 001 1 010 1 000 1 011 0 101 0 011 1 011 0 100 0 011 0 100...
The questions: 1. What type of technology Acme and Omega utilize to transform inputs into outputs?...
The questions: 1. What type of technology Acme and Omega utilize to transform inputs into outputs? 2. Which strategic choice (differentiation or cost leadership) suits best to Acme? Omega? Do these companies have clear strategic choices or do they stuck in the middle? 3. Based on all the contingencies which type of structure is more suitable for these companies; mechanistic or organic? please answer each question alone The Paradoxical Twins: Acme and Omega Electronics John F. Veiga Part! boom of...
The Business Case for Agility “The battle is not always to the strongest, nor the race...
The Business Case for Agility “The battle is not always to the strongest, nor the race to the swiftest, but that’s the way to bet ’em!”  —C. Morgan Cofer In This Chapter This chapter discusses the business case for Agility, presenting six benefits for teams and the enterprise. It also describes a financial model that shows why incremental development works. Takeaways Agility is not just about the team. There are product-management, project-management, and technical issues beyond the team’s control. Lean-Agile provides...