Den-long-men of void-jar(hardware and Software)


Published on

Electronics Hobby, DIY
assist void-jar if you like

Published in: Design
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Den-long-men of void-jar(hardware and Software)

  1. 1. Hardware and Softwareabstract:In this essey, write a HDL(xilinx etc), c/c++(ARM etc), OS Kernel(Linux etc), file system(ext, btrftetc), compiler(gcc etc).In the section 1, consider how HDL(HDL, Verilog) change into binary file, .bit file (using HDL anduser constraints file, .ucf and changing to binary file, .bit file.).And download(write) binary fileinto FPGAs internal programs 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(linuxs Virtual RAM disc file system) etc, Kernel(linuxkernel etc), daemons(linux systems 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 ardwares 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 scriptlanguage( 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. 2. Section 1, VHDL(Verilog) and how to change to binary file, .bit file.1.1 VHDL and Verilog fileVHDL 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, ( modules instance )Languages:compornent, end compornent, port map, module, endmodule/******************************************************************************/Terms: input, output, 3state, signal, wire, registerLanguages: signal, reg, std_logic_vector/******************************************************************************/Describing a process( simultaneous processing and sequential processing ) and the controlsentences.process ( conditions ) begin----end process;
  3. 3. if (conditions ) then----end if;/******************************************************************************/Terms:Conditional branching, case sentence, event driven, rising edgeLanguages: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 HDLs 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 fileVHDL files and sub files change into bitstream files to write CPLD or FPGA.1.2.1 ExampleXis 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 : modules 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 delaysseveral seconds.Truth table change to Boolean algebra Table with Disjunctive normal form, DNF or Conjunctivenormal form, CNF.Then it changes into Gate Arrays peculior( original ) binary (file).(one slice structure and PROM etc FPGA read timings )
  4. 4. Section 2, ARM and pripherals and the compile and programming.2.1 Compilers for ARM and HardwaresFamous compilersKeil MDKIAR EWMS vc++ 20xxCant forget vc++20xx. This compiler was used for ARM and even xis ISE. It can use excutablefile(program) and download binary file into some hardware using USB etc.Famous LibrariesSMSIS ----it is famous lib for ARM. It absorbs chips differences. The ships are STM32,6440, SAM9, AM1x, etcMPSSE ----famous library for I2C, SPI, Jtag contraller, UM232H, it can costruct thesestandards with PCs compiler( not ARM compiler (only) )Famous HardwaresARM CPU Boards ----The ships are STM32, 6440, SAM9, AM1x, etcUM232H ----famous interface module(hardware) for I2C, SPI, Jtag, using with MPSSEPeripheralsLCD controller ----S1D13781, RTD2660, 2023L etcUSB Hast controller ----S1R72U06, SL811-HST, etcEthernet controller ----RTL8019 etcTo study datasheet, libraries, sample programs.
  5. 5. Section 3, file system and OSSection 3.1 and 3.2 file systemTo 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 systems partition.When execute df command, can see the file systems type.In the case of Linaro, it includes vfat, ext4.Vfat ----originally, it is a wins file system, its famous, it may use the reason.Ext4 ----it is famous linux file system.c.f. File systems most head part is MBR.In the file systems, bootloader(not BIOS), initrds (compressed) image, OS (a Kernel and theDaemons) 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 actcorrectly.(But bootloader may be choosen or not.)When the bootloader excute, it expands kernel into initial ram disk ,inird which is made into RAMmemory(hardware) by bootloader.If system(hardware) turns ON, the system boot acts with BIOS.The process is,BIOS (=> MBRs max 512 program) => bootloader => kernel and some daemons in initrd => mainfile 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, usinglinux command, mount./******************************************************************************/Terms:file system, ext, vfat, btrfs, MBR, linux command, mount, -loop df, bootloader, BIOS, initial ramdisk,Commands:mount(options: -loop etc), df, dd, fdisk, etc/******************************************************************************/
  6. 6. Section 4, compiler, linker, and script language for auto languageMainly consider about gcc. Other compiler may be same.Section 4.1,4.2 .c file .h file .o file a.file and compiler optionsFor C language, if library is used, librarys header file wll be used.Consider about these two files:main.c ----Body of the C programlib.h ---Header, interface part of a library.Then lib.h will be described in main.c files declaration part, #include.Then the librarys variables, functions, etc.The other hand, when the library is constructed, these two files are.lib.hlib.cWhen 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 functionsinterface 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.clib.h(lib.c)lib.o orlib.aAnd 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 makes script).If make file, make exist crrectly, then the program source can be compiled.
  7. 7. /******************************************************************************/Terms:script, shell, bash, emvilonment, configuration, configure, gnu makeCommands:su, sudo, sh, ./configure(not command, shell script files excute), make(with option)/******************************************************************************/