Lab Report 10

pdf

School

Texas A&M University *

*We aren’t endorsed by this school

Course

248

Subject

Electrical Engineering

Date

Dec 6, 2023

Type

pdf

Pages

4

Uploaded by CountLightningSwan17

Report
ECEN 248 - Lab Report Lab Number: TEN Lab Title: A Simple Digital Combination Lock Section Number: 529 Student’s Name: Haya Abusada Student’s UIN: 232006631 Date: 11/14/2023 TA: Siqi Fan
Objectives: The objective of this lab report is to implement a digital recreation of a conventional access control mechanism using a classic password-based approach. The focus is on creating a combination-lock system on the ZYBO Z7-10 board, employing a Moore machine, which is a type of Finite State Machine (FSM). Using the push buttons, switches and LEDs on the ZYBO Z7-10 board, the goal is to prototype a digital combination-lock that requires the correct password for access. The exercises aim to reinforce concepts covered in lecture, providing hands-on experience with the implementation of access control systems, gaining insight into the practical application, in a digital environment. Design: The design segment of this laboratory experiment focuses on creating a digital combination-lock for use on safes or access-controlled doorways. The combination-lock Finite State Machine (FSM) is described in Verilog, with the design presented through a state diagram. Switches on the ZYBO Z7-10 board are configured to input a 4-bit password in binary format. The lock operation is outlined step by step, involving setting up switches with specific binary values and pressing corresponding buttons. The FSM progresses through states S0 to S3, with transitions governed by password inputs and button presses. The completion of the combination and pressing the 'Key0' button in the final state, S3, unlocks the system. The FSM returns to the reset state, S0, upon the assertion of the 'Reset' button. The output logic is straightforward: if the current state is not S3, 'Lock == 0'. The state diagram, depicting transitions and outputs, serves as a guide for the Verilog implementation is below. The behavioral Verilog description follows the completed state diagram and leverages the example FSM implementation in the Background section. The module interface is aligned with the defined states, transitions, and output logic to realize an effective digital combination-lock on the ZYBO Z7-10 board. In Part 2 of the experiment, an additional state is incorporated into the FSM operation to unlock.
SOURCE CODES FOR 3 STATES FOR 4 STATES Results : Wave form is shown below. Verilog code was written for the FSM for 3 states and 4 states, then programmed onto the ZYBO to allow a visual representation to be seen. When testing the correct password combination in the correct order all LEDs lit up to indicate it was unlocked and the Verilog correctly represents the FSM.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Conclusions: In conclusion, this lab has provided a thorough exploration of digital combination-lock systems, concentrating on the design and implementation of a Finite State Machine (FSM) for access control on the ZYBO Z7-10 board. By translating the conventional combination-lock mechanism into a digital format, we gained practical insights into using Verilog for FSM description. The step-by-step operation, from setting the password through button presses to unlocking, highlighted the importance of clear state transitions and logical output conditions. The lab reinforced the concept of using FSMs for modeling complex behaviors and demonstrated the practical application of digital access control. Overall, this hands-on experience enhanced understanding and proficiency in designing and implementing digital combination-lock systems. POST LAB DELIVERABLES 1. Source code is in the design section above. 2. Waveform in the results section above. 3. Question 1e - The test checked for every transition, rest and hold/otherwise condition stated in the lab manual for the FSM, therefore the test was exhaustive and checked for all possibilities. 4. 16 numbers possible per state, and numbers can be reused, number of possibilities would be, for 3 state = 16 x 15 x 14 = 3360 combinations, but if numbers can be reused int he password than the total number of combinations is instead 16 x 16 x 16 = 4096 combinations. For the modified design with 4 states, if there’s no repetition of numbers – then 16 x 15 x 14 x 13 = 43680 combinations, if there is repetition then 16 x 16 x 16 x 16 = 65536 combinations. STUDENT FEEDBACK 1. What did you like most about the lab assignment and why? What did you like least about it and why? This was my first time digitally implementing an FSM, so understanding and seeing how it worked firsthand was a good experience. 2. Was there any section of the lab manual that were unclear? If so, what was unclear? Do you have any suggestions for improving the clarity? The lab manual was clear on all the different parts that needed to be implemented. 3. What suggestions do you have to improve the overall lab assignment? The lab was very informative, and the TA was helpful in resolving any issues that arose; so, there isn't much to improve about the lab itself.