1. Field of the Invention
The present invention relates to the field of programming and configuring programmable electronic devices. More particularly, the present invention relates to using a design system for (i) displaying choices for user-selected functions; (2) displaying choices for where and how to implement the selected function; and (3) automatically generating computer code, that when executed, will configure the electronic device to perform the selected function.
2. Related Art
A microcontroller is an integrated circuit device (“chip”) composed of functional units or “blocks,” input/output pins, internal busses and programmable interconnections among these components. Many of these configurable components can be programmed to perform a specific function or connect to another specific sub-system by loading a particular bit pattern into a particular register in the actual chip. Recently, a microcontroller having programmable analog and digital blocks has been introduced.
In addition, a microcontroller also has a central processing unit (“CPU”) and a memory system for storing data and instructions. The CPU and the memory system can interact with a programmable block, e.g., a configurable component, by reading and writing registers associated with that component. The configurable blocks are therefore programmed by setting their configuration registers with certain values. Thus, by writing a program for the CPU, a user can specify the function the configurable component will perform as well as the connections among configurable components. The user can also write programs that interact with the configurable components once those components have been initialized. The programs also do this by reading and writing registers associated with the configurable components.
Configuring and programming a microcontroller requires specifying and setting an enormous number of bits. It is common for engineers who need to configure and program a microcontroller to develop and use software for that purpose such as design tools, databases, assemblers, compilers, linkers, and debuggers. However, conventional microcontroller programming and configuring requires that the engineer incorporate the literal binary codes and addresses associated with the configurable components into the microcontroller source code.
This conventional technique therefore requires many manual steps and is error-prone and tedious. In other words, if a designer wants to program a configurable block to implement a circuit, then the designer manually determines the configuration registers of the hardware resource. The circuit designer then manually develops code to program those registers in such a way to realize the circuit (e.g., an amplifier). The designer then has to manually write code to operate the circuit in the desired fashion, e.g., give the amplifier a specific gain, etc. When dealing with physical addresses of configuration registers and the specific configuration data needed to program them, the data and information are often expressed as a series of numbers in decimal and/or hexadecimal and/or binary formats. Unfortunately, these numbers and number formats are very complex and hard to read and remember. Any small error in syntax, or a typographical error, or a transposition error can be fatal for the overall program. Manual programming and mapping leads to such errors.