Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Chip
ASSIGNMENT
Centre Name: Electronics and
Communication Engineering
Course Name: M.Sc (Engg) in Real Time
PROGRAMME (PEMP)
Name of the Student : Nyjil George
Student Registration No : CHB0408011
Declaration Sheet
Delegate’s Name Nyjil George
Reg No CHB0408011
M.Sc (Engg) in Real Time Embedded
Course Batch PT-2008
System
Module Code ESD524
Module Title System On A Programmable Chip.
Module Start Date 19-12-2009 Submission Date 13 – 02 - 2010
Module Leader Mr. Sanket Dessai
Submission Arrangements
This assignment must be submitted to Academic Records Office (ARO) by the submission date before 1730 hours
for both Full-Time and Part-Time students.
Extension requests
Extensions can only be granted by the Head of the Department / Course Manager. Extensions granted by any other
person will not be accepted and hence the assignment will incur a penalty. A copy of the extension approval must be
attached to the assignment submitted.
Late submission Penalties
Unless you have submitted proof of Mitigating Circumstances or have been granted an extension, the penalties for a
late submission of an assignment shall be as follows:
• Up to one week late: Penalty of one grade (5 marks)
• One-Two weeks late: Penalty of two grades (10 marks)
• More than Two weeks late: Fail - 0% recorded (F2)
All late assignments must be submitted to Academic Records Office (ARO). It is your responsibility to ensure that
the receipt of a late assignment is recorded in the ARO. If an extension was agreed, the authorization should be
submitted to ARO during the submission of assignment.
To ensure assignments are written concisely, the length should be restricted a limit indicated in the assignment
questions. Each participant is required to retain a copy of the assignment in his or her record in case of any loss.
Declaration
The assignment submitted herewith is a result of my own investigations and that I have conformed to the guidelines
against plagiarism as laid out in the PEMP Student Handbook. All sections of the text and results, which have been
obtained from other sources, are fully referenced. I understand that cheating and plagiarism constitute a breach of
University regulations and will be dealt with accordingly.
Signature of the
Nyjil George Date 20/01/2010
Delegate
Signature of Signature of
Module Leader Course Manager
Contents
_______________________________________________________________________
Title Page i
Declaration ii
Abstract iii
List of Tables iv
List of Figures v
Acknowledgement vii
1.0 System On A Chip, An Introduction. 1
1.0.1 VARIOUS TECHNOLOGIES. 1
1.0.2 SYMMETRIC AND ASSYMMETRIC MPSOC. 1
1.0.3 COMPARISON, SMPSOC AND ASMPSOC. 3
1.1 CACHE MECHANISM IN MPSoC. 3
1.1.1 MESI protocol 5
1.2 OPERATING SYSTEMS FOR MPSOC. 5
2.0 32 Bit A.L.U Design 7
2.1 Adder/Subtracted Design. 8
2.2 Logic Operations. 9
2.3 VHDL Code For One Bit ALU. 9
2.4 VHDL Code For 32 Bit ALU. 10
2.5 Explanation of 32 Bit ALU with Test Benches. 11
2.6 32 BIT ALU VHD FILE 12
2.7 Test Bench Programme to test All Design Possibilities. 14
2.8 32 Bit ALU DESIGN Conclusion and Result. 17
3.0 Porting Micro C OS on Xilinx FPGA. 18
3.1 µC/OS-II. 18
3.2 Xilinx FPGA SPARTAN 3. 18
3.3 Configuration of Micro C Source OS. 18
3.4 COMPILE AND BUILD MICRO C OS IMAGE 22
3.5 Porting The Image to the Target Board. 25
3.6 Application Program. 25
3.7 OUTPUT 26
3.8 Result And Conclusion. 26
4.0 Bibliography 27
Abstract
_______________________________________________________________________
List of Tables
_______________________________________________________________________
Table 01 ALU Logic Operations. 9
Table 02 .Com Port Setting for porting. 24
List of Figures
_______________________________________________________________________
Acknowledgement
_______________________________________________________________________
I wish to express my profound thanks to all those who helped in making this assignment
a reality.
I am especially grateful to the great Director MSRSAS ,Dr.Shankarpal for his
time-to-time, much needed, valuable guidance. Without the full support and cheerful
encouragement of Mr. Sanket Dessai the assignment would not have been completed in
time.
Finally I thank all my class colleagues for having good group discussions, which
helped me to understand the concept better.
Symmetric MPSOC means, two or more identical processors can connect to a single shared main
memory. Most common multiprocessor systems today use an SMP architecture. In the case of multi-
core processors, the SMP architecture applies to the cores, treating them as separate processors.
SMP systems allow any processor to work on any task no matter where the data for that task are
located in memory, provided that each task in the system is not in execution on two or more
M.S Ramaiah School of Advanced Studies –Postgraduate Engineering and Management Programme (PEMP)
processors at the same time; with proper operating system support, SMP systems can easily move
tasks between processors to balance the workload efficiently.
In the case of multi-core processors, the SMP architecture applies to the cores, treating
them as separate processors. SMP systems allow any processor to work on any task no matter where
the data for that task are located in memory; with proper operating system support, SMP systems can
easily move tasks between processors to balance the workload efficiently.
Asymmetric MPSoC means a system assigns certain tasks only to certain processors. In particular,
only one processor may be responsible for fielding all of the interrupts in the system or perhaps even
performing all of the I/O in the system. This makes the design of the I/O system much simpler,
although it tends to limit the ultimate performance of the system.
The Massachusetts Institute of Technology (MIT) and Digital Equipment Corporation (DEC)
was introduced the ASMP by early 70s. ASMP allows applications to run specific subtasks on
processors separate from the "master" processor. ASMP computers are composed of multiple
physical processors that are unique, and thus not symmetrical. These processors are defined as either
master or slave: master processors are more capable than slaves and are given full control over what
the slave processors do.
Cache memory is fast acting memory than RAM, normally it is Built in with CPU, or located
next to it on a separate chip. The CPU uses cache memory to store instructions that are repeatedly
required to run programs, improving overall system speed. The advantage of cache memory is that
the CPU does not have to use the motherboard’s system bus for data transfer. Whenever data must
be passed through the system bus, the data transfer speed slows to the motherboard’s capability. The
CPU can process data much faster by avoiding the bottleneck created by the system bus.
Software Based:MPARM is the best example for the software based Cash memory architecture.
The ISS is modeled as a C++ class (CArmProc) and is embedded into a SystemC wrapper
(armsystem). The wrapper allows the usage of the ISS in a SystemC environ, while the bus interface
(implemented in the class STBus initiator) is in charge to translate the ARM requests
toward the bus, to bus-specific protocol requests. In addition, the core contains its cache
as a data member of type CCache. This is a base class from which other classes that
implement specific cache types can be implemented: the fully associative CAssociativeCache), the
directmapped (CDirectCache), and set-associative cache (CSetAssociativeCache).
Hardware Based: The type of interconnect of the multiprocessor architecture: When processors
are connected through a shared medium (such as a bus), protocols can use broadcasting to enforce
coherence. These protocols are called snoopy protocols. These schemes apply to small-scale bus-
based multiprocessors, because of the limited scalability of buses. In absence of a shared medium as
interconnect.
each other at very high-speed rates is being envisioned. One of their main design challenges will be
the prototyping and power optimization of SoCs consisting of hundreds of processing cores. The OS
can select the voltage and frequency setup of the processor according to their workload and
attending to power, thermal or, in this case, reliability constraints. Also, in the case of heterogeneous
MPSoCs where there are different processing cores, the OS can select the assignment of the tasks to
balance the workload or reduce the premature aging of the devices.
The recent trends of OS development are more moving towards optimizing these factors. Run
time utilization, Resource optimization , Predictability , Reliability , Robustness, POSIX 1003.1b
API including threads, RTEID/ORKID based Classic API, TCP/IP Stack, high
performance port of FreeBSD TCP/IP stack, UDP, TCP, ICMP, DHCP, RARP, TFTP,
RPC, FTPD, HTTPD, CORBA, SNMP, Debugging, GNU debugger (gdb), DDD GUI
interface to GDB thread aware, debug over Ethernet, debug over Serial Port,
Filesystem Support, In-Memory Filesystem (IMFS), TFTP Client Filesystem, FTP
Client Filesystem, FAT Filesystem (IDE and CompactFlash), NFS client,
multitasking capabilities, homogeneous and heterogeneous multiprocessor
systems, event-driven, priority-based, preemptive scheduling, optional rate
monotonic scheduling, intertask communication and synchronization, priority
inheritance, responsive interrupt management, dynamic memory allocation,
high level of user Configurability scripting and Python scripting language.
CHAPTER 2
Part B.
2.0 32 Bit A.L.U Design
Arithmetic and Logic Unit (A.L.U.) – the most significant component inside the C.P.U.
for our learning of the “behind the scene”. It is the chief of operations of the computer. A.L.U.
performs two major operations in processing data: all mathematical computations (addition,
subtraction, ultiplication, and division) and all logical operations (comparisons of data such as;
greater than, less than, equal, greater than or equal to, and less than or equal to). These processing
are the main concentration of how a computer process data, and is the foundation of the “behind the
scene.
When S=0, the circuit adds; when S=1, the circuit subtracts.
11 Subtract
Table 01 ALU Logic Operations.
2.3 VHDL Code For One Bit ALU.
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity aludesign is
Port ( A : in STD_LOGIC_VECTOR (31 downto 0);
B : in STD_LOGIC_VECTOR (31 downto 0);
Sel : in STD_LOGIC_VECTOR (1 downto 0);
Res : out STD_LOGIC_VECTOR (31 downto 0));
end aludesign;
begin
-- use case statement to achieve
-- different operations of ALU
case Sel is
when "00" =>
Res <= A + B;
when "01" =>
Res <= A - B;
when "10" =>
Res <= A or B;
when "11" =>
Res <= A and B;
when others =>
end process;
end Behavioral;
PORT MAP (
Op_A => Op_A,
Op_B => Op_B,
Op_Sel => Op_Sel,
Output => Output
);
PROCESS
BEGIN
WAIT FOR 50 ns;
Op_Sel <= "000";
Op_A <= "00000000000000110000000000000100";
Op_B <= "00000000001110000000000000000011";
WAIT FOR 50 ns;
Op_Sel <= "001";
Op_A <= "00000000000000000000111000000111";
Op_B <= "00000000000000010000000000000011";
WAIT FOR 50 ns;
Op_Sel <= "010";
Op_A <= "00000000000001100000000001000000";
Op_B <= "00000000000010000011000000000011";
WAIT FOR 50 ns;
Op_Sel <= "011";
Op_B <= "00000000001110000000000001000000";
Op_A <= "00000000010000000001100000000011";
WAIT FOR 50 ns;
Op_Sel <= "100";
Op_A <= "00001100000000000000000000000101";
Op_B <= "00000000000000000000100000000011";
WAIT FOR 50 ns;
Op_Sel <= "101";
Op_A <= "00000000000000110000000000001001";
Op_B <= "00000000000000000000010000000101";
WAIT FOR 50 ns;
PART C CHAPTER 3
______________________________________________________________________________
3.1 µC/OS-II.
Most of µC/OS-II is written in highly portable ANSI C, with target microprocessor-specific code
written in assembly language. Assembly language is kept to a minimum to make µC/OS-II easy to
port to other processors. µC/OS-II is a completely portable, ROMable, scalable, preemptive, real-
time, multitasking kernel. µC/OS-II is written in ANSI C and contains a small portion of assembly
language code to adapt it to different processor architectures. To date, µC/OS-II has been ported to
over 45 different processor architectures. A ‘port’ is the part of the software that adapts µC/OS-II to
different processor architectures. The files that comprise the MicroBlaze port are included as a
readymade package from Micrium website as an example µC/OS-II-based application.
3.2 Xilinx FPGA SPARTAN 3.
The MicroBlaze Spartan3A DSP 1800A Embedded Development Board utilizes Xilinx Spartan-3E
XC3SD1800A-4FG676 device. The board includes 125MHz System Clock, RS232 serial ports, 8
DIP switches, 4 push buttons, 8 LEDs, VGA port, 4 SPI Ports, 10/100/1000 Ethernet port, 64MBit
SPI flash, 16 MB of parallel NOR flash and 128MB DDR2 SDRAM. User I/O is supported with a
168 Pin EXP mezzanine connector, 2 Digilent 6 pin ports, and a general purpose 30 pin I/O
connector. The MicroBlaze(TM) 32-bit soft processor is a RISC-based engine with a 32 register by
32 bit LUT RAM-based Register File, with separate instructions for data and memory access. It
supports both on-chip BlockRAM and/or external memory. All peripherals are implemented on the
FPGA fabric.
3.3 Configuration of Micro C Source OS.
The Micro C Os is free downloadable from Micrium Website that is AN-1013.Zip.The content of
this Zip is the following Directories.
1 Micrium\AppNotes\AN1xxx-RTOS\AN1013-uCOS-II-MicroBlaze
2 \Micrium\Software\EvalBoards\Xilinx\Generic\GNU\EX1_OS
3 \Micrium\Software\EvalBoards\Xilinx\Generic\GNU\BSP
4 \Micrium\Software\uCOS-II\Source
5 \Micrium\Software\uCOS-II\Ports\MicroBlaze\GNU
6 \edk_user_repository\Micrium\bsp\uCOS-II_v2_90_a
Choose the Micro blaze IP core and staptan-3 device in the next screen. Also choose the clock
required for the application, debug method and RAM memory required as shown below screen shot.
Now choose the peripheral of your choice for the application here. I have chosen GPIO for LED
interface, RS 233 for connectivity and push buttons. Also configure the memory mapping; I have
used the default memory mapping.
Control
while(1)
{
xil_printf("Task1 is in execution...\r\n");
LED_Write(LED_DATAa);
OSTimeDlyHMSM(0,0,3,0);
LED_Write(LED_DATAb);
OSTimeDlyHMSM(0,0,3,0);
}
}
int main(void)
{
BSP_IntDisAll();
OSInit();
OSTaskCreate(Task1,0,&Task1Stk[TASK1_STK_SIZE - 1],TASK1_PRIO);
OSStart();
}
3.7 OUTPUT
USB to Jtag
Converter
Power Supply
Fig 3. 8 Output.
4.0 Bibliography
________________________________________________________________________________
[1] Lathi B.P, Modern Digital and Analog communications systems, PRISM publications, Indian
Low Price Edition, Aug 2009
[2] Roger W. Peterson, Introduction to MPSoC Communication, Prentice Hall Publications, Aug
2009
[8] Ambler, Scott William, The Xilinx SoC Complete Guide. Cambridge University Press. ISBN
0-521-54018-6. November 2004. Available from: http://www.dctcompletereference.org.
Accessed: [13 Jan 2010].
[9] Schoonees, J.A.; Braun, R.M, A note on the MPSoC signals crosstalk, Communications and
Signal Processing 1993. International Conference. IEEE International Conference vol.1 256
– 260.
© IEEE Digital Object Identifier 10.1109/COMSIG.1993.365860
[10] Morelos-Zaragoza, R.H.; Shu Lin, u-COSII block-modulation codes for unequal error
protection, Embedded Engineering. Information Theory, IEEE Transactions on Volume 41,
Issue 2, March 1995 Page(s):576 - 581
© IEEE Digital Object Identifier 10.1109/18.370154
[11] Prabhu, V.K, u-COSII and Offset Modulation with Bandlimiting Filters Computer
Engineering, Aerospace and Electronic Systems, IEEE Transactions on Volume AES-17,
Issue 1, Jan. 1981 Page(s):2 - 8
© IEEE Digital Object Identifier 10.1109/TAES.1981.309029
[12] Wright, C.; Cowan, C.; Morris, J.; Smalley, S, G, Digital security modules: general security
support for the Communication techniques: an empirical study of comprehension. 26 June
2002 Page(s):13 - 22
© IEEE 10.1109/VISSOF.2002.1019790
[14] How to Cite References. Online. Academic Services Group, Faculty of Business
Administration, University of Ulster. Available from:
http://www.busmgt.ulst.ac.uk/business/pi/resmeth/plag.doc [6 July 2009].
Appendix
________________________________________________________________________________