1. Hardware and Software
abstract:
In this essey, write a HDL(xilinx etc), c/c++(ARM etc), OS Kernel(Linux etc), file system(ext, btrft
etc), compiler(gcc etc).
In the section 1, consider how HDL(HDL, Verilog) change into binary file, .bit file (using HDL and
user constraints file, .ucf and changing to binary file, .bit file.).
And download(write) binary fileinto FPGA's internal program's memory or external PROM etc.
Using standard, IEEE1149.1, Jtag etc and download cable.
In the section 2, consider about ARM CPU chips.
Considering compilers(Keil, IAR EW, vc++20xx), libraries(CMSIS etc, MPSSE etc),
Hardwares(STM32VL(F)Discovery etc, UM232H etc, (S1D13781) etc) .
These libraries and chips are famous, so the data can be gotten easily.
In the section 3, describe OSs and file systems.
Sub-section 1 Considering file systems( ext etc ), image file, .img file, .
Sub-section 2, Considering a boot, inird(linux's Virtual RAM disc file system) etc, Kernel(linux
kernel etc), daemons(linux system's programs or modules), utilities( BUSYBOX etc ).
(linux: Friendly linux, linaro, etc)
In sub-section 1, briefly consider a constructing the image file, .img file, mounting the image file,
.img file, etc.
In sub-section 2, briefly consider a boot process, kernel system(linux kernel and daemons, actually,
these in a file system are all of (CUI) linux system.).
And utilities(linux BUSYBOX).
If the system is actually act, linux system is available in the ardware's system.
Furthere more, GUI system (Xwindows system, etc) is to be considered.
In the section 4, consider a compiler and linker(GNU GCC etc). And consider a script
language( GNU make, etc).
And consider c file, .c file, header file, .h file, archive file, .a file.
And consider a compiler(GNU gcc)'s options(compile and link options).
And consider a so-called auto compiler language(GNU make etc).
2. Section 1, VHDL(Verilog) and how to change to binary file, .bit file.
1.1 VHDL and Verilog file
VHDL is a famous hardware description language, and the standard is described in IEEE1076-
2008.
/******************************************************************************/
Describing a structure.
library IEEE;
use IEEE.std_logic_1164.all ----definition of standard libraries
----
entity USR_ENTITY_NAME is ----actural I/O port definitions.
port (
IN1 : in std_logic;
----
);
end USR_ENTITY_NAME;
architecture RTL of USR_NAME is
begin
----
PROCESS ----processes (plural)
etc
----
end RTL;
/******************************************************************************/
Terms:
instance, compornent instance, configuration definition, ( module's instance )
Languages:
compornent, end compornent, port map, module, endmodule
/******************************************************************************/
Terms: input, output, 3state, signal, wire, register
Languages: signal, reg, std_logic_vector
/******************************************************************************/
Describing a process( simultaneous processing and sequential processing ) and the control
sentences.
process ( conditions ) begin
----
end process;
3. if (conditions ) then
----
end if;
/******************************************************************************/
Terms:
Conditional branching, case sentence, event driven, rising edge
Languages:
always @, if, elsif(else if), else if(not elsif), case, <= (input, not smaller than or equal to), and, or,
begin, end, 'event
/******************************************************************************/
Describing input and output:
NAME : in std_logic;
NAME : out std_logic;
NAME : inout std_logic;
/******************************************************************************/
These are verilog HDL's structure. It is famous then mamy books exist.
Read books, search examples(specific xilinx kits etc), and study terms and languages.
1.2 VHDL to bitstream file, .bit file
VHDL files and sub files change into bitstream files to write CPLD or FPGA.
1.2.1 Example
Xi's EDKxx and ISExx change VHDL into binary file.
The EDA has some source file tyoes. The famous is....
.xmp : project file ----open at first in EDK
.ucf : user constraint file ----user definition file
.v : module's file
.bit : bitstream file ----last binary file, to write in FPGA with Jtag, IEEE1149.1 etc.
To use these files, ISE compiles VHDL file to binary(bitstream) file natively.
Some sentence, if or case changes into Truth Table.
Sequential logics change to simultaneous logics to input output logics and the output logics delays
several seconds.
Truth table change to Boolean algebra Table with Disjunctive normal form, DNF or Conjunctive
normal form, CNF.
Then it changes into Gate Array's peculior( original ) binary (file).
(one slice structure and PROM etc FPGA read timings )
4. Section 2, ARM and pripherals and the compile and programming.
2.1 Compilers for ARM and Hardwares
Famous compilers
Keil MDK
IAR EW
MS vc++ 20xx
Can't forget vc++20xx. This compiler was used for ARM and even xi's ISE. It can use excutable
file(program) and download binary file into some hardware using USB etc.
Famous Libraries
SMSIS ----it is famous lib for ARM. It absorbs chip's differences. The ships are STM32,
6440, SAM9, AM1x, etc
MPSSE ----famous library for I2C, SPI, Jtag contraller, UM232H, it can costruct these
standards with PC's compiler( not ARM compiler (only) )
Famous Hardwares
ARM CPU Boards ----The ships are STM32, 6440, SAM9, AM1x, etc
UM232H ----famous interface module(hardware) for I2C, SPI, Jtag, using with MPSSE
Peripherals
LCD controller ----S1D13781, RTD2660, 2023L etc
USB Hast controller ----S1R72U06, SL811-HST, etc
Ethernet controller ----RTL8019 etc
To study datasheet, libraries, sample programs.
5. Section 3, file system and OS
Section 3.1 and 3.2 file system
To see file system of linux, several file system exists. (rootfs, devtmpfs, ext2, ext3, ext4 etc)
In aditon, boot directory or tmp directory mounts other file system's partition.
When execute df command, can see the file system's type.
In the case of Linaro, it includes vfat, ext4.
Vfat ----originally, it is a win's file system, it's famous, it may use the reason.
Ext4 ----it is famous linux file system.
c.f. File system's most head part is MBR.
In the file systems, bootloader(not BIOS), initrd's (compressed) image, OS (a Kernel and the
Daemons) are written normally.
File systems can be recognised by (specific) bootloader. Then linux kernel can boot.
If writing an correct OS kernel into correct file system('s directory) properly, the OS system can act
correctly.
(But bootloader may be choosen or not.)
When the bootloader excute, it expands kernel into initial ram disk ,inird which is made into RAM
memory(hardware) by bootloader.
If system(hardware) turns ON, the system boot acts with BIOS.
The process is,
BIOS (=> MBR's max 512 program) => bootloader => kernel and some daemons in initrd => main
file system mount.
If the sequent act correctly, the OS system excute.
If it excutes, utilities(can use BUSYBOX etc) can use. Utilities is in /bin directory, etc can use,
because path is established.
Can establish file system (directory system) into image file, .img.
It can be made by linux command, dd, etc, and seen(written or read) in some empty directory, using
linux command, mount.
/******************************************************************************/
Terms:
file system, ext, vfat, btrfs, MBR, linux command, mount, -loop df, bootloader, BIOS, initial ram
disk,
Commands:
mount(options: -loop etc), df, dd, fdisk, etc
/******************************************************************************/
6. Section 4, compiler, linker, and script language for auto language
Mainly consider about gcc. Other compiler may be same.
Section 4.1,4.2 .c file .h file .o file a.file and compiler options
For C language, if library is used, library's header file wll be used.
Consider about these two files:
main.c ----Body of the C program
lib.h ---Header, interface part of a library.
Then lib.h will be described in main.c file's declaration part, #include.
Then the library's variables, functions, etc.
The other hand, when the library is constructed, these two files are.
lib.h
lib.c
When these are compiled, the -c option is used( the case of the c language compiler, gcc ).
The sentence of .c file is same as the single .c file, and .h file is the interface( like function's
interface declarations ).
If the -c option is used, lib.o fila is generated. And if prural object files, .o files are grouped,
the archive file, .a file generated(by some options).
Then these files exsist.
main.c
lib.h
(lib.c)
lib.o
or
lib.a
And when these files and main.c file(includes these libraries) sre compiled,
these object files or archive files are listed after the compiler command, gcc.
This is a all compile actions.
/******************************************************************************/
Terms:
compiler, gnu compiler collection, gcc, linker,
Options for gcc:
-c, -o( not object generation ), -lm
/******************************************************************************/
Section 4.3, script language for auto compile, make(gnu make)
make(gnu make) is a script language compiler which can use linker description, several command,
etc.
And configure file is the configuration file(not make's script).
If make file, make exist crrectly, then the program source can be compiled.