Finalproject
Finalproject
Finalproject
CPRE 281
Final Project
Circuit for checking if a list of numbers is sorted
Introduction
The goal of this project was to registers and register files to first allow you to enter a list of eight
numbers. Once they have been entered, you could change the mode from initialization to
checking m
ode. In checking mode, the board will go through the values in the registers 0-7
while checking that they are progressing in ascending order (in other words: it is increasing).
I first designed a 2-bit Comparator in verilog. After that I went ahead and made a symbol out of
it and designed a 4-bit comparator (Figure 4).
8 to 1 4-bit Multiplexer
The 8 to 1 4bit Multiplexer is needed to have two distinct reading ports. The inputs of the
Multiplexer is the output of the registers. Depending on the select lines, the read port will output
the value from certain register. Figure 5 shows how I designed 8 to 1 4-bit Multiplexer.
Figure 6: 3 to 8 Decoder
For the select lines for ‘RQ’, I need it to go from 1-7. For that made a symbol of Figure 8 and
then used a 4-bit adder.
Clock Generator
The clock generator for both NSL’s shown above was kept in the project to make sure that it
was consistent for both NSL’s.
Figure 12
Small yet Essential Contributors
With this section I would like to go through some of the smaller components that made a lot of
difference in the overall working of the circuit.
Figure 13 shows the block diagram I made just for the Seven Segment
Displays. By making this into a symbol it made it much easier to keep
track of what is going on.
Mode Change
Write at the start of the project (Figure 14) there is an ‘enable’ for the decoder that allows the
user to input the data at a particular address. I simply put a ‘not’ gate in front of it so that at the
start, it will be in initialization mode. When the switch assigned for the enable is turned it will
therefore deactivate the initialization mode. Connected to the enable are the necessary
components for checking mode.
Location of Anomaly
One of the tasks for the assignment is that if the inputted numbers are not in increasing order,
we should output where the NSL found the number that isn't increasing. Right at the bottom of
Figure 14, I used three ‘and’ gates and connected the output of SRQ with out of the comparator
if the values aren’t increasing. Therefore, if the values aren’t increasing the location will be
displayed on LED’s.
Conclusion
In Conclusion, this was a very difficult project that took a lot of time and effort. But overall the
circuit that I made works perfectly, and it is made in a way that is pretty easy to explain to
someone else.
Appendix 1
Appendix 2