Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the VHDL code that will generate a 2-bit counter that advances at a pace o

ID: 2293310 • Letter: W

Question

Write the VHDL code that will generate a 2-bit counter that advances at a pace of about 0.67 seconds per count.[Note:More specifically, at 0.67108864 sec/count.

3. [Blinker circuit, 4 pts] Write the VHDL code that will generate a 2-bit counter that advances at a pace of about 0.67 seconds per count. [Note: More specifically, at 0.67108864 sec/count.]. Turn in your code as well as a user constraints file that would allow you to implement this system in our board and display the 2-bit counter in LEDs and 0 (MSB and LSB of the counter, respectively). The system should have a reset input that at the same time clears the counter to zero and disallows the count In addition to the code and the UCF, you should do a test bench that simulates the counter, making use of the technique shown in pages 95 and 96 in your textbook. The output of the simulation (exactly 8,388,608 times slower than the board implementation) is shown below: Name 100 ns 200 s 300 ns leds 10 01

Explanation / Answer

2 bit up COUNTER:

entity count_2bit is
    port(CLOCK : in STD_LOGIC;
        reset : in STD_LOGIC;
        dout : out STD_LOGIC_VECTOR(1 downto 0));
end count_2bit;
architecture behaviur of count_2bit is
begin
counting : process (CLOCK,reset) is
    signal m : std_logic_vector (1 downto 0) := "00";
    begin
        if (reset='1') then
            m := "00";
        elsif (rising_edge (CLOCK)) then
            m := m + 1;
        end if;
        dout <= m;
    end process counting;
end count_2bit;