Part 1

Part 2

You are to design a counter that continuously outputs hexadecimal values from 0 through F, with varying speeds based on the Speed input. There is a parameter for clock frequency (CLOCK_FREQUENCY), and you need to account for it in your design.

  1. Building the Counter: You can use D-flip flops to construct the counter. In Verilog, this can be abstracted as simply adding 1 to the previous state of the counter.
  2. Rate Divider:
  3. Display Counter:
  4. Integration: Once you've created and tested the RateDivider and DisplayCounter modules individually:
  5. FPGA Testing:
  6. Schematic: It's important to draw a schematic diagram of your design before writing any code. This diagram should display the entire structure of the part2 module, including both the RateDivider and DisplayCounter modules inside it. Prepare this schematic before the lab session.
  7. Testing:

Part 3

  1. Morse Code Patterns: The first thing you need to do is to convert the given Morse code representations for the letters A through H into sequences of 0's and 1's. You need sequences of 12-bits for each letter. For instance:
  2. Shift Register: You need a 12-bit shift register. When a letter is selected, you'll load the corresponding 12-bit pattern into this shift register. Every 0.5 seconds, you'll shift out one bit from this register. This bit will be the value for DotDashOut.
  3. Rate Divider: To generate the 0.5 seconds pulse, use a rate divider. Count how many clock cycles correspond to 0.5 seconds based on the provided CLOCK FREQUENCY parameter.
  4. MUX for Letter Selection: Use a 3-to-8 decoder to decode the 3-bit Letter input into one of the eight possible letters. Use these outputs to select the appropriate Morse code pattern from your 12-bit patterns for each letter.
  5. Counters:
  6. NewBitOut Pulse: Generate a pulse for NewBitOut similar to Part 2. Every time a new bit is shifted out, NewBitOut should be set to 1 for one clock cycle.
  7. Reset & Start Logic: Implement the logic such that: