One of the initial problems we ran into was maintaining standards throughout the different registers in our circuit. We soon got lost in a sea of poorly named inputs and outputs and had little idea where different wires were intended to go. This problem was significantly worsened because we initially failed to keep our vector declarations straight. We alternated between using "downto" and "to" when declaring the bits of a vector. This soon raised large problems as we tried to fit all the components together. However, retracing our steps allowed us to create a singular standard for the entire program and relabel inputs and outputs for clarification.
When we were trying to extend the lab by writing the upper-level design in VHDL, we had some large hang-ups with syntax and port map statements. After figuring out where internal signals should be declared, we struggled for quite some time with ambiguous error messages. Finally, we realized that the entire problem was a syntax problem. We had reversed the order in which the clock and reset entered into one of the components in our port map declarations. Fixing this little misstep removed that problem.
One of the stranger problems we encountered was when we added input through the dipswitches. After adding the necessary code, we simulated the inputs and it worked perfectly. However, after programming the chip and wiring all the dipswitches, it basically failed to work. None of the programs that had worked in simulation gave results that resembled their simulated equivalents. After a little bit of testing, we realized that we had failed to account for the inputs being a vector declared "13 downto 0". We had wired it backwards. This problem fixed, we set about testing a variety of programs and found that maybe half of them worked and the other half gave erratic results. The erratic results seemed to follow no patterns - sometimes the lights would invert themselves, sometimes they would all go off, sometimes they would all be on. However, after ten minutes of frustrated testing, we realized that there was a pattern in the light's behavior. The programs we were writing behaved as if one of the dipswitches was permanently off. We replaced the wire connecting this switch to the chip and tried again. Same results. After reviewing the simulation results, we realized that the problem was in the hardware; the dipswitch didn't work.
Click here to go to the previous part of the lab write-up.