Design of variable speed colored light controller using VHDL language

Publisher:JikaiLatest update time:2010-06-01 Source: 现代电子技术Keywords:VHDL Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

Hardware Description Language (HDL) is relative to general computer software languages ​​such as C and Pascal. HDL is a computer language used to design hardware electronic systems. It describes the logical functions, circuit structures and connection methods of electronic systems. Designers can use HDL programs to describe the desired circuit system, specify its structural features and circuit behavior, and then use synthesizers and adapters to turn this program into gate-level or lower-level structural netlist files and download files that can control the internal structure of FPGA and CPLD and implement corresponding logical functions. VHDL (Very High Speed ​​Integrated Circuit Hardware description Language) is mainly used to describe the structure, behavior, function and interface of digital systems. Compared with other HDL languages, VHDL has stronger behavioral description capabilities, which determines that it has become the best hardware description language in the field of system design. Strong behavioral description capabilities are to avoid specific device structures. It is an important guarantee for describing and designing large-scale electronic systems from the perspective of logical behavior. In the literature, the author expounds on the application of EDA technology from different perspectives. It has the characteristics of powerful functions, strong description capabilities, good portability, short development cycle, and low cost. Even if the designer does not understand the structure of the hardware, he can carry out independent design. This paper uses Max+PlusⅡ provided by Alter Company as the platform to design a variable-speed colored light controller. It can implement the programming control scheme of modifying the flower pattern arbitrarily by changing the software without modifying the hardware circuit. It can control 16 LEDs to display in 8 patterns and 4 speeds in a cycle. The design is very convenient and the designed circuit has strong confidentiality.

1 Design Principle

When designing with VHDL, we should first understand that VHDL is an all-round hardware description language, including multiple design levels such as system behavior level, register transfer level and logic gate level. We should make full use of VHDL's "top-down" design advantages and hierarchical design concepts. The hierarchical concept is very useful for designing complex digital systems. It allows us to start with simple units and gradually build large and complex systems.

First, the system modules should be divided, and the functions of each module and the interfaces between the modules should be specified. The final design is divided into three modules: 16-way pattern light controller, four-frequency output divider, and four-choose-one controller. The four-choose-one controller selects clock signals of different frequencies from the divider and transmits them to the pattern light controller, so as to control the flashing speed of the lights and the change of patterns.

Below is the top-level module schematic diagram of this design as shown in Figure 1.

The top-level module schematic diagram of this design

2 Submodules and their functions

(1) Four-frequency output divider. According to the requirement, there are 4 speed changes, each of which needs to display 8 patterns, so a three-bit counter and a 16-bit digital decoder are required. Secondly, there are 4 speed changes, but there is only one input clock signal, so the input clock signal needs to be divided. This design uses 2-division, 4-division, 8-division and 15-division to obtain 4 different frequency signals.

The program code of the binary frequency divider circuit is as follows:

program [page]

There are two schemes for designing a four-way frequency divider circuit: one is to connect two two-way frequency divider circuits in series (see Figures 2 and 3) to achieve four-way frequency divider; the other is to modify the program code of the two-way frequency divider circuit to achieve it, and make the following modifications:

program

Divider circuit module symbol

Four-way frequency divider circuit module symbol

Similarly, there are two solutions for the design of the eight-frequency division circuit: one is to connect two four-frequency division circuits in series to achieve eight-frequency division; the other is to modify the program code of the two-frequency division circuit. You only need to make the following modifications:

program

The 15-frequency division circuit is shown in Figure 4, and the simulation diagram is shown in Figure 5. The code is as follows:

program

15-frequency circuit module symbol

Simulation waveform of 15-frequency division circuit [page]

The top-level module schematic diagram of the four-frequency output divider is shown in Figure 6, and the simulation waveform is shown in Figure 7.

Top-level block schematic of a four-frequency output divider

Frequency divider simulation waveform

(2) Four-choice controller. The function of the four-choice controller is to select different clock signals from the frequency divider and send them to the color light controller to achieve the change of the flashing frequency of the color lights, as shown in Figures 8 and 9. The source code is as follows:

program

Module symbol of four-choice controller

Output simulation waveform of four-choice controller [page]

(3) Colored light controller. The colored light controller circuit is the core of the entire design. It controls the output effect of the entire design, that is, the pattern changes. In the circuit, 1 represents the light on, and 0 represents the light off. Different combinations of 0 and 1 according to different rules represent different light patterns. At the same time, it can select different frequencies to achieve a variety of patterns and multiple frequencies. The program fully demonstrates the flexibility of designing circuits with VHDL, that is, the number of colored lights can be changed by changing the number of bits of the output variable in the program. As shown in Figures 10 and 11.

Symbols of pattern control modules

Simulation waveform of colored light controller

The code is as follows:

program

program

program [page]

program

3 Conclusion

Using VHDL language to design circuits has simple ideas and clear functions. Using Max+PlusⅡ to design circuits can not only perform logic simulation, but also timing simulation. Using PLD not only saves the trouble of circuit production, but also allows repeated hardware experiments, which is very convenient to modify the design, and the designed circuit has strong confidentiality. In short, the use of EDA technology makes the design of complex electronic systems simple and easy, and improves the efficiency of design.

Keywords:VHDL Reference address:Design of variable speed colored light controller using VHDL language

Previous article:Using RapidIO technology to build a reconfigurable signal processing platform
Next article:Design of switch precoding in LTE system based on FPGA

Recommended ReadingLatest update time:2024-11-16 16:39

Development of Temperature Automatic Control System Based on CPLD
"Temperature" is a common and very important control parameter in various industrial control production. People have developed various temperature automatic control systems for different control objects, among which the software control algorithm is relatively mature, but the hardware structure of the temperature cont
[Microcontroller]
Development of Temperature Automatic Control System Based on CPLD
The design of controller_4G08 realizes the control of Flash by FPGA
This paper designs a Flash controller controller_4G08, which has its own instruction set, which can easily realize the control and read and write operations of FPGA to Flash. The FPGA main state machine can send instructions to controller_4G08 at the system clock frequency, and then wait for the interrupt returned by c
[Industrial Control]
The design of controller_4G08 realizes the control of Flash by FPGA
Introduction to the top-down design method of FPGA/EPLD and its advantages and disadvantages
Top-Down Design Method for FPGA/EPLD: The traditional design method is to use the schematic input method, as shown in Figure 1. By calling the corresponding physical component library provided by the FPGA/EPLD manufacturer, the designed system is drawn in the circuit schematic, and then the netlist required by
[Microcontroller]
Introduction to the top-down design method of FPGA/EPLD and its advantages and disadvantages
XRD44L60 driver timing design based on VHDL
1 Introduction 电荷耦合器件(Charge Coupled Devices,简称CCD)是一种光电转换式图像传感器。它利用光电转换原理将图像信息直接转换成电信号,实现非电量测量。由于CCD的输出信号是负极性的离散模拟信号,并且混杂有幅度较大的复位脉冲干扰,为了获得高质量信号,必须对CCD输出信号进行直流箝位、相关双采样、低通滤波和放大等预处理,以消除各种干扰和噪声。同时,为了便于计算机处理和大容量存储,还必须对CCD输出信号进行数字化处理。目前市场上CCD专用的视频信号处理器件不仅具有双采样技术,而且还具有自动暗电平补偿、自动增益和A/D转换等功能。这里给出了一款CCD专用的视频信号处理器件XRD44L60,并介
[Industrial Control]
XRD44L60 driver timing design based on VHDL
Implementation of radar high-speed data acquisition system based on FPGA+DSP
0 Introduction With the rapid development of radar data processing technology, it is necessary to collect radar echo signals at high speed. However, after the laser radar's transmission wave and echo signal are converted by photoelectric devices, the electrical signal pulse width is narrow, the amplitude is low, and
[Embedded]
Implementation of radar high-speed data acquisition system based on FPGA+DSP
Integrated power supply monitoring device based on ARM and FPGA
With the development trend of integration, informatization and intelligence in the modern power industry, the power system requires that the station AC power supply, DC power supply, communication power supply, UPS power supply, inverter power supply, etc. are no longer decentralized and independent systems, but are ce
[Microcontroller]
Integrated power supply monitoring device based on ARM and FPGA
Non-uniformity correction of image sensor based on CPLD
The non-uniformity of image sensors directly affects the detection sensitivity and spatial resolution of the imaging system. When observing scenes with such an imaging device, the imaging quality will inevitably be affected, and the image will even be blurred. Therefore, the non-uniformity must be corrected. Althoug
[Industrial Control]
Non-uniformity correction of image sensor based on CPLD
Design of SDRAM Interface Based on VHDL
RAM is usually used for caching data and programs. With the development of the semiconductor industry, RAM has achieved rapid development, from RAM, DRAM (Dynamic RAM) to SDRAM (Synchronous Dynamic RAM). The capacity of RAM is getting larger and the speed is getting higher. It can be said that the capacity and speed o
[Analog Electronics]
Design of SDRAM Interface Based on VHDL
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号