I. Introduction
Background of the research project.
With the rapid development of information technology, information technology has penetrated into almost all areas of our lives, changing the state of human existence and thinking mode. The electronic design automation (EDA) technology involved in our topic was born in this era and has a great impact. FPGA is a new type of programmable logic device, which has the advantages of short design and development cycle, low design and manufacturing cost, and advanced development tools compared with traditional ASICs, and is especially suitable for product sample development and small batch production. The traditional digital voltmeter mostly takes the single-chip microcomputer as the control core, the chip integration is not high, the system connection is complex, and it is difficult to miniaturize, especially when the product demand changes, it has to be re-arranged and debugged, which increases the investment risk and cost. The use of FPGA for product development can flexibly configure modules, which greatly shortens the development cycle and is also conducive to the development of digital voltmeters in the direction of miniaturization and integration. With the development of electronic technology, the design of current digital electronic systems is developing in the direction of fast speed, large capacity, small size and light weight. The engine behind this trend is the advancement and refinement of ASIC design technology. At present, the design of digital systems can be directly oriented to user needs, and according to the behavior and functional requirements of the system, the corresponding description, synthesis, optimization, optimization and verification are completed from top to bottom, and the devices are directly generated. In addition to the system behavior and function description, almost all the other designs can be automatically completed by computers, which means that electronic design automation (EDA) can greatly shorten the design cycle of the system to meet the needs of today's electronic market with many varieties and small batches.
With the development of integrated circuit (IC) technology, electronic design automation (EDA) has gradually become an important design method, and has been widely used in many fields such as analog and digital circuit systems. At present, the development of electronic technology is mainly reflected in the field of EDA, and the design of digital systems is developing in the direction of fast speed, large capacity, small size and light weight. Electronic design automation is a modern electronic design discipline that has developed rapidly in recent years and crosses the use of computer software, hardware and microelectronics technology. Among them, the VHDL language in the EDA design language is a fast circuit design tool, and its functions cover three major circuit design work, such as circuit description, circuit synthesis, and circuit **. The circuit design of this voltmeter is done in VHDL language. The main software used in this design is Quartus II designed by Altera in the United States.
The FPGA design offers the following advantages:
1) Hardware design software.
This is the biggest advantage of FPGA development. Traditional hardware circuit design should first carry out functional design, and then carry out circuit board-level design and debugging after weighing the circuit board, if there is any error in the circuit, the entire circuit board will be invalid, which is very uneconomical. The development of FPGA can be completely separated from the hardware at the functional level and do software on the EDA software. When the function is confirmed, the design of the hardware circuit board can be carried out. Finally, the designed, by the EDA software generated by the flashing file to the configuration equipment, debugging, if the result is inconsistent with the requirements, you can immediately change the design software, and flash to the configuration chip again without changing the external hardware circuit.
2) Highly integrated, high working frequency.
Typical FPGAs have millions of logic gates integrated inside, and multiple modules can be planned inside them that are equivalent to the functions of traditional small-scale integrated devices. This approach of integrating multiple legacy devices inside the same chip not only improves the size of the board, but also reduces the effort of PCB routing. Since each module is integrated inside the FPGA chip, this greatly solves the problem of signal interference, so that the working frequency of the FPGA can be greatly increased. In addition, the general FPGA has a PLL frequency multiplier clock inside, which further solves the problem of electromagnetic interference and electromagnetic compatibility.
3) Support a variety of interfaces.
The FPGA chip supports a wide range of standard interface levels, and EDA development tools can be used to select which interface standards to use, including commonly used TTL and differential inputs. This facilitates the matching of various interface circuits on the backend.
FPGA design flow.
The design of programmable logic devices is the process of developing devices using EDA development software and programming tools. It consists of seven steps: design preparation, design input, functionality, design processing, timing, and device programming and testing.
1 Design Preparation.
Before the system design, it is necessary to carry out the preparation work such as scheme demonstration, system design and device selection.
A top-down design approach is generally adopted, but a traditional bottom-up design approach can also be adopted.
2 Design Input.
Design inputThe process of representing the designed system or circuit in some form required by the development software and feeding it into a computer is called design input. Design inputs typically come in the following centralized form:
1) Schematic input mode.
2) Hardware description language input mode.
3) Waveform input method.
3 Features**.
The function is also called the front. The circuit designed by the user must be verified by the logic function before compilation, and there is no delay information at this time, which is very convenient for preliminary function detection. If an error is found, the logical design will be modified in the design input back.
4 Design Processing.
Design processing is a core part of device design. In the process of design processing, the compilation software will logically simplify, comprehensively optimize and adapt the design input files, and finally produce programming files for programming. The main ones are: 1) Grammar check and design rule check.
2) Logical optimization and synthesis.
3) Adaptation and segmentation.
4) Layout and routing.
5 Timings**.
Timing is also known as post-timing or delay. Because the internal delay of different devices is different, and different layout and wiring schemes also have different effects on the delay, it is very necessary to carry out the timing of the system and each module, analyze its timing relationship, estimate the performance of the design, and check and eliminate the competitive risk.
6 Device Programming Testing.
Once the timing is complete, the software generates a data file for programming the device.
VHDL language description.
Hardware Description Language (HDL) is a language for describing the hardware behavior, structure, and data flow of electronic systems. At present, the design of digital electronic systems can be carried out using hardware description languages. With the deepening of research, the hardware description language is used to analogue electronic system design or hybrid electricity.
Subsystem design is also being explored.
There are many types of foreign hardware description languages, some of which are developed from Pascal, and some of which are developed from C language. Some HDLs become IEEE standards, but most are enterprise standards. VHDL is more than the U.S.-side, and other hardware description languages are more than private companies. It can be said that a hundred schools of thought contend, a hundred flowers bloom. The spread of these different languages to the country has also had different effects. There are two types of hardware description languages that are more influential in China: VHDL language and Verilog HDL language. These two languages have become IEEE standard languages.
The design flow of the VHDL language.
The design process of using VHDL language to design hardware circuit system can generally be divided into the following steps. Definition of hardware circuit system design requirements. Write a VHDL language program that describes the functionality of a hardware circuit system. Simulation of VHDL language programs. Synthesis, optimization, and place-and-route of the VHDL language. Design simulation after place-and-route. Programming of the device. In the process of summing up the hardware circuit system, the designer must have a very clear understanding of the design purpose and design requirements of the hardware circuit system before writing the VHDL language program.
quartusiiIntroduction to the development platform
Quartus II is an integrated environment for FPGA CPLD development provided by Altera, one of the world's largest programmable logic device vendors. Launched at the beginning of the 21st century, Quartus II is the successor to Altera's previous-generation FPGA CPLD integrated development environment, Max+Plus II, with a user-friendly and easy-to-use interface. Workflow for design input, HDL synthesis, cabling layout (adaptation), * and **, and hardware testing can be completed on the Quartus II, providing a structure-agnostic design environment that allows designers to easily perform design input, fast processing, and device programming.
The voltmeter designed this time has a measurement range of 0 5V and an accuracy of 001v。The design characteristics of this voltmeter are: through software programming** to hardware implementation, short design cycle, high development efficiency.
Keywords: Electronic Design Automation (EDA); fpga;vhdl;a/d;Digital voltmeter.
2. Design tasks and requirements
It is required to sample the analog signal from the external input by using the FPGA control module data converter, obtain the current voltage value, and display it on the digital tube
Traditional digital voltmeter designs usually use large-scale ASIC (application-specific integrated circuits) as the core device, supplemented by a small number of medium-scale integrated circuits and display devices. ASIC completes from analog input to digital output, is the heart of digital voltmeter, the design of this voltmeter is simple, high accuracy, but this design method due to the use of ASIC devices makes it lack flexibility, its system function is fixed, it is difficult to update and expand,. The design flexibility of the digital voltmeter of the microprocessor (microcontroller) control general-purpose A D conversion device has been improved, and the scalability of the system function has become simpler, but due to the limited number of pins of the microprocessor, its control conversion speed and flexibility still cannot meet the needs of the growing electronics industry. EDA technology and FPGA should be used, which has high integration, fast speed, very reliable performance, user-free programming, easy-to-understand programming language, and very convenient system engineering expansion. The FPGA chip is used to control the general-purpose AD converter, but the speed and flexibility are much better than that of a digital voltmeter composed of a microprocessor and a general-purpose AD converter.
a, can realize the sampling control of one channel;
b, generate various control signals required for ADC0809 work;
c, calculate the converted digital voltage signal, and represent it in BCD code.
Overall block diagram
Solution 1: This paper uses ADC0809 as the voltage sampling port, FPGA as the core device of the system, uses LED for digital display, and converts the read 8-bit binary data into a convenient output of 3-bit decimal BCD code to the digital tube.
The FPGA chip is used as the core device of the system, which is responsible for the startup of ADC0809's AD conversion, address latching, input channel selection, and data reading. At the same time, the read 8-bit binary data is converted into a BCD code that is convenient for the output of 3-digit decimal and sent to the digital tube to display the current measured voltage value. These tasks are completed by the ADC0809 conversion control module, data conversion module, and decoding module.
ale:out std_logic; start:out std_logic; add:out std_logic_vector(2 downto 0));end ad;architecture one of ad istype states is(st0,st1,st2,st3,st4);signal current_state,next_state:states:=st0;signal temp:std_logic_vector(7 downto 0);signal lock:std_logic;begin add<="001"; dataout<=temp; process(current_state,eoc)begin case current_state is when st0=>ale<='0';start<='0';oe<='0';lock<='0'; next_state<=st1; when st1=>ale<='1';start<='1';oe<='0';lock<='0'; next_state<=st2; when st2=>ale<='0';start<='0';oe<='0';lock<='0'; if (eoc='1')then next_state<=st3; else next_state<=st2; end if; when st3=>ale<='0';start<='0';oe<='1';lock<='1'; next_state<=st4; when st4=>ale<='0';start<='0';oe<='1';lock<='1'; next_state<=st0; end case; end process;process(clk)begin if(clk 'event and clk='1') then current_state<=next_state; end if;end process;process(lock)begin if lock='1' and lock 'event then temp<=datain; end if;
The information is based on this