Question: This assignment refers to the circuit diagram on the next page. This circuit is an example of a Linear Feedback Shift Register ( LFSR )

This assignment refers to the circuit diagram on the next page. This circuit is an example of a Linear
Feedback Shift Register(LFSR) which has the ability to generate pseudo-random numbers. Each
01 transition in the CLK signal will generate a new random number.
1.(25%) Using CircuitVerse, create the LSFR circuit.
a. After creating the circuit, make sure to initialize the circuit by toggling the preset_02
and reset input.
i. Note: The splitter can be found in the Misc tab and should be created as
follows:
1. Enter Bit Width: 16
2. Enter bit split: 1111111111111111
b. You can control the CLK input by toggling the clk_enable input.
c. Make a list of the first 10 numbers generated by the circuit.
d. Hand in your list of numbers in both binary and hexadecimal format.
2.(75%) Export the Verilog code for this circuit using the Export Verilog feature in the Tools
tab.
a. Both the testbench code and the Verilog circuit code should be contained within the file
that you download.
b. Separate out the design file and the testbench file so you can simulate the circuit using
the EDA playground.
c. You will need to edit the testbench and write code to toggle the reset and preset and
enable the clock.
d. You will need to edit the design file so that the DD flipflop works the same as it does in
CircuitVerse (code to use the preset_023 signal must be integrated into the reset if
statement).
e. Run a simulation to generate 10 numbers
f. Hand in your list of numbers in both binary and hexadecimal format.
g. Hand in a timing diagram of your simulation
3.(Extra credit) Design and use CircuitVerse to simulate a circuit that will use the LFSR to
encrypt and decrypt a 16-bit message using a one-time pad.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!