Beginning FPGA Programming - Partie54
Beginning FPGA Programming - Partie54
Step 4: If you want to make the design able to reload after power is lost on the board, you need to select
light_sensor.pof file. This file will ask the programmer to program the file to the flash memory which is
nonvolatile. Figure 12-48 shows the difference when you select a .pof file. I suggest you use the .sof file to
try out a couple of times and tune the high boundary and low boundary values. You can use the .pof file
to program the FPGA when it is close to the final design. Remember to check the Program/configure box
before you click the Start button.
261
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire
Figure 12-48. Start to program the design with the .pof file
262
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire
263
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire
264
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire
12.7 Summary
This chapter shows you how to configure and generate two Altera IPs—ADC IP and PLL IP. You know
how easy it is to employ something useful without knowing how it really works (like driving a car without
knowing how an engine moves your car forward or backward). We only need to know the interface to the IPs
and how to handle it. These two IPs are very useful for the next chapter because we will reuse all of them and
add more fun (design) to them.
The light sensor ADC sequencer shows you a simple FSM. It only has two states and every clock cycle
the state changes to another state.
We demo one more time how to create a counter and flip-flop in the light sensor counter led module
with generic settings. The top-level design (light_sensor_top.vhd) is a good top module example. It should
only have connections and instantiation designs. You should minimize putting combination logic and
sequential logic in the top-level file.
We hope you enjoyed this tripwire design and we will use a third-party IP and add more interesting
designs in the next chapter.
■■Note Due to an ADC offset issue, the ADC output always has an offset 0.8V, which is around 1300 from the
ADC output value. That is the reason my low boundary value is set to higher than the value 1300.
265