One by One Till All Done
Modifying the debouncer design was how this week started and end for me. I used a counter for my previous design but this was not recommended by Dr. Shawn since it takes up a lot of space and the design could be simplified even further just by using a Linear Feedback Shift Register (LFSR). LFSR use a shift register for the input bits that is dependent on its previous state. In a way, the design would be more efficient and optimized when using LFSR as the amount of space necessary to execute the design will be minimized.
I ran into some problems when the design was not synthesizable. I found out it was just a careless error of assigning blocking and non blocking assignments in Verilog. I was angry with myself for a moment as it took me quite some time to realize just a small, careless mistake. I made a comparison between the previous design (counter) and current design (LFSR) based on the synthesis report. It was then apparent that LFSR is definitely better in terms of size and even speed. After smoothly compiling and synthesizing, I got the design to work on the push button. Hence, I moved on with designing the next module.
I chose the laser emission module as it was simple like the first LED module designed, only outputs to be fed. As soon as it worked, I proceed with the next module which is the touch sensor module. It detects the touch of human body and I made the LED on the FPGA board as an indicator when the touch triggers a signal to be sent. One by one, I executed the designs made for other modules such as tilt switch, mercury switch, infrared obstacle avoidance sensor, digital temperature sensor and also a small microphone module. It was quite cool and exciting to see how all those modules worked.
Dr. Shawn checked my design of debouncer and noted that I should include it in the design of other necessary modules as well. He also explained further on LFSR and advised that I should justify the reasons for the decisions I made in my designs. In this case, the widths of my LFSR counter to determine how long the debouncer should be. I hope I can get the ideal time to debounce for most modules and quickly proceed with the module design. At a faster pace, it might be possible for me to finish the modules one by one till all of it are done. Hopefully.