‏إظهار الرسائل ذات التسميات الهندسيات. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات الهندسيات. إظهار كافة الرسائل

20121002

Error Correcting Code..


 Error Correcting Code


The Application of computer software began to expand in several businesses and daily life, and that software requires significant components in order to get sufficient computer application. A memory is a one of those significant components. This mini-project comes to show how memory errors happened, how to detect these errors and how to correct them?. The mini-project idea is to explain function of Error Correcting Code (ECC). The main tasks of this mini-project will be done in four parts. The first part is showing memory system in computing machine, and then classifying memories. The second part is showing memory errors. The third part is explaining ways of errors detection in the ECC. The fourth part is going through errors correction in the ECC.


Chapter 1: Introduction
Memories are important hardware in any computing machine. It is used to hold data and instructions. Sometimes, errors occur in the data on the memory as a software problem. The solution of this problem must be software which can fix these errors. The software, which is required, is a code.

1.1  Computer Software
Software is a collection of computer programs that perform different tasks on a computer system. Computer software consists of a machine language that consists of groups of binary values, which specify processor instructions*.There are different types of computer software. The major types are:

1.      Programming Software: is one of the most commonly known and popularly used forms of computer software.
2.      System Software:  is a collection of operating systems; devise drivers, servers, windowing systems and utilities.
3.      Application Software: It enables the users to do specific tasks.
4.      Utility Software: helps in the management of computer hardware and application software.
5.      Data Backup and Recovery Software: preserve the original data and allow an easy retrieval of the backed up data.


Computer software are widely popular today and hence we cannot imagine a world of computers without them.
1.2  Objective of This Report
The objective of this reportis to highlight memory errors, errors detection and errors correction and also, to present functionality of errors correcting code (ECC). 

1.3  Why and where this project is useful
The errors correcting code (ECC) is a method used to detect and correct errors introduced during storage or transmission of data. Certain kinds of RAM chips inside a computer implement this technique to correct data errors and are known as ECC Memory. 

1.4  Report Structure
This report contains four chapters including the introduction. Each one of these chapters will be described in the following.Chapter two talks about the memory system, types of memories and memories errors. Chapter three talks about memory errors detection, correction and errors correcting code (ECC). Chapter four talks about ECC memory vs. non- ECC memory.

Chapter 2: Memory system
Memory system is the system where the computer holds the instructions that the processor executes and the data that those instructions work with. It consists of three main types of memories.


2.1  Memory types
Memory is one of main components on the computing machine. There are three types of memories. The first one is a read only memory (ROM) which can retain stored data when not powered. The second is a random access memory (RAM) which cannot retain stored data when not powered. The third is a special type of RAM is called cache memory.
2.1   Memory Errors
Memory is an electronic storage device, and all electronic storage devices have the potential to incorrectly return data different than what was originally stored. The data that is stored in the memory is bits and each bit ether a zero or a one.
There are two kinds of errors that can occur in a memory system. The first is called a hard error. It occurs when a piece of hardware is broken or is lost. During this error, computer system cannot work. Actually, the hard error is detected by the basic input/output system (BIOS) during boot process. The BIOS can detect the hard error but, it cannot fix it. The common message, which display on the computer monitor if there is a hard error, is shown in figure below.    

The second memory error is called a soft error. This occurs when a bit returns the wrong value. It occurs during storage processes. The soft errors are caucused by memory that is physically bad, poor quality of motherboards and memory system or other similar problems that are not related to the memory directly. In addition, the radioactivity that is come from materials used in PC systems can cause the soft error. This kind of error can be detected and fix it. Next chapters show that.

Chapter 3: Memory Errors Detection & Correction
Errors detection & correction are methods that are used to detect positions of wrong bits and to correct the detected wrong bits. Actually, the detection and correction are parts of a special code which is called Error Correcting Code (ECC).

3.1 Memory Errors Detection
There are many methods that are used for detecting. Parity checking is a simple method of detecting errors between data being written to computer memory and read back again. Parity checking examines each byte of data and sets a ninth bit, is known as a parity bit, to one if the number of ones is odd and zero if the number of ones is even. This means that a correct byte will always have an odd number of ones and if it does not, when the data is read back from memory, an error is reported. 



  1. 3.2 Memory Errors Correction



It is a method that is used to correct the reported errors. Hamming Code is the method of error detection and correction. It is used for correcting. It manages error correction on their own instead of going back and requesting the data source to resend the original data. These codes can correct single bit errors occurring in data. Multi-bit errors are very rare and hence do not pose much of a threat to memory systems. 

3.3 Error Correcting Code (ECC)
An error-correcting code is an algorithm of adding redundant data, or parity data, to data, such that it can be read back even when a number of errors occur, during the process of storage. The figure below shows simply how ECC work.
Chapter 4: ECC Memory vs. non- ECC Memory
Parity memory modules have an extra chip on them to check for errors. Therefore, non-parity memory should have an even number of chips on the module and parity memory should have an odd number. Typically, there will be 8 chips on a non-ECC module and 9 chips on an ECC module.

However, some parity SIMMs can have 12, 18, 24 or 36 chips. Therefore, a sure-fire way to determine of a memory module is parity or non-parity is to divide the number of chips on the module by three. If the number is evenly divisible by 3, it is a parity, or ECC module. If the number of chips is not divisible by three, the module is non-parity, or non-ECC.





 Conclusion:



At the end of this report, i thought the objectives are archieved. The computer memory is one of the important components of computer. There are two types of memory errors; hard error occurs when a piece of hardware is broken or is lost. There is a technical solution for this problem. Soft error is a second type, occurs when a bit returns the wrong value. It can be solved by using ECC.

References:
http://searchwindowsserver.techtarget.com/news/1073867/Error-correcting-code-memory-and-parity

















20120910

OpenSSH quick review

http://www.openssh.org/




OpenSSH stands for open source secure shell. It is a set of computer programs providing encrypted communication sessions over a computer network using the SSH protocol. OpenSSH was created by the OpenBSD team. It’s development is funded via donations. The last five versions of OpenSSH are:


·         OpenSSH 6.1: August 29, 2012
·         OpenSSH 6.0: April 22, 2012
·         OpenSSH 5.9: September 6, 2011
·         OpenSSH 5.8: February 4, 2011
·         OpenSSH 5.7: January 24, 2011


OpenSSHs’ principle:
OpenSSH provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations.
The OpenSSH server component, sshd, listens for client connections from any of the client tools. When a connection request occurs, sshd sets up the correct connection depending on the type of client tool connecting. For example, if the remote computer is connecting with the ssh client application, the OpenSSH server sets up a remote control session after authentication. If a remote user connects to an OpenSSH server, the OpenSSH server daemon initiates a secure copy of files between the server and client after authentication. OpenSSH can use many authentication methods, including password and public key.



Figure 1 Principle of OpenSSH

Installation:
Installation of the OpenSSH client and server applications is simple. To install the OpenSSH client applications on Ubuntu system, the following command is used at a terminal prompt:
sudo apt-get install openssh-client

To install the OpenSSH server application the following command is used at a terminal prompt:


sudo apt-get install openssh-server

Configuration:

Once OpenSSH has been installed. It can be configured by editing the sshd configuration file where locates at /etc/ssh/sshd_config. The following are examples of configuration directives you may change:
·         To set OpenSSH to listen on TCP port 2222 instead of the default TCP port 22, change the Port directive as such:
Port 2222
·         To have sshd allow public key-based login credentials, simply add or modify the line: PubkeyAuthentication yes

p /etc/ssh/     sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
            sudo chmod a-w /etc/ssh/sshd_config.original

to effect the change using the following command at terminal prompt:
sudo /etc/init.d/ssh restart


Conclusion


OpenSSH encrypt communications between hosts over an insecure network, and it’s great for logging into and executing commands remotely. It’s also useful for port forwarding which allows us to securely tunnel arbitrary TCP connections and for secure file transfers using the SFTP protocol. 


find more details about OpenSSH









20120226

Designing 8-bits Carry Look Ahead Circuit


The aim of this project is to Obtain logic diagram for a complete 8-bit binary adder/subtractor circuit based on carry look-ahead principle and to simulate the circuit in LogicWorks. They are not allowed us to use any of the carry look-ahead ICs/decoder/multiplexer available in LogicWorks library but to design the entire circuit lonely using gates only. It also include timing diagrams to prove that the designed circuit does addition/subtraction correctly for various input combinations.




 The design of CLA is successfully worked and checked by Dr. TariqJamel. 
 ========================================================

Designing
8-bits carry Look Ahead Circuit

                                                                                             
         Engr. Ghalib  Alhashmi    

      =======================================================

Table of Contacts


Chapter1: Introduction to Carry Look Ahead Adder/Subtractor (CLA)…………………….…1
Chapter2: Design 8-bits CLA (Adder/Subtracror)………………………………………….…2
2.1 Defining Problem…………………………………………………………….……3
2.1.1 The 8-bits Binary Addition and Subtraction……………………………………………………...…....………3
2.2 Design 8-bits CLA……….…………………...…………………………………..4
2.2.1 Truth Table……………….…………………………………………….4
2.2.2 K-map………....……………………………………………………….4
2.2.3 Design Using LogicWork software………....……………………………………5
Chapter3: CLA Simulation……...……………………………………………………………..6
3.1 Addition …………………....…………………………………………………….6
3.2 Subtraction………………………………………………………………………..7
Conclusion…………..………………………………………………………………………...9
References……..……………………………………………………………………………..10





=====================================================================



Chapter1: Introduction to Carry Look Ahead Adder/Subtractor CLA


The addition and subtraction both are arithmetic operations that are performed in the central processing unit (CPU). The arithmetic logical unit is a major part of performing them. There are various circuits that can perform those operations. The circuits are Carry look ahead (CLA), Binary parallel, BCD and other circuits.
Let Ai and Bi be addend, respectively, the outputs Si and Ci denote sum and while Ci denotes carry into the position i.
Col#
n-1
i
2
1
0
carry
Cn-1
Ci
C2
C1
C0

An-1
Ai
A2
A1
A0

Bn-1
Bi
B2
B1
B0





Sn
Sn-1
Si
S2
S1
S0
Last carry out









Figure 1.1 Simple circuit diagram of full adder


As shown in the Fig.1, the two internal signals Pi and Gi are given by:
Pi= Ai XOR Bi   …………………….. (1.1)
Gi= A AND Bi …….……………….. (1.2)
The output sum and carry can be determinate as:
Si=Pi  XOR Ci ………………………..(1.3)
Ci+1=Gi OR (Pi AND Ci) ……….. (1.4)
Where Pi is called carry propagation that can be produced by XORing Ai and Bi. Where Gi is called carry generate that can be produced from ANDing Ai and Bi. Both Pi and Gi only depend on the input Ai and Bi.
The i-bits carry look ahead (CLA) consists of 3 levels of logic:
Input: entering the input value of Ai and Bi in binary form. It may also consists XOR gate (with input Bi and C0) to change the operation (addition or subtarction).
First level: generate Pi and Gi signals. It consists of XOR gates and AND gates. The output signals from this level are P’s and G’s.
Second level: generate Ci signals as defined in expression (1.4). The output signals Ci come from ORing Gi and the outcome from ANDing Ci-1 and Pi. This level consists of OR and AND gates.
Third level: generate the sum signals Si. XOR gates are valid in this level.
Output: shown the output value in binary form.
Table 1.1: Number of gate in each level on CLA for i-bits input.
Gate
LEVEL 1
LEVEL 2
LEVEL 3
TOTAL
AND
i
i
0
2i
OR
0
i
0
i
XOR
i
0
I
2i

Table1.1 shows numbers of gates that are required to design CLA. From expressions (1),(2),(3) and (4), the number of AND gates is i ,if the input has i bits, in LEVEL1 also, LEVEL2 consists of i number of AND gates but LEVEL3 does not required any AND gate. The OR gate appear only in LEVEL2 with number of i. The XOR gates are required in LEVEL1 with i number of gate as well the same number on LEVEL3.
In this project, the CLA will be considered to design and implement addition and subtraction operations using LogicWork* software. The project will not implemented hardwarely.

Chapter2: Design 8-bits CLA (Adder/Subtracror)


Design is an important part, this chapter going through project design details. Designing 8-bits CLA consists of two parts. First part is defining problem clearly and then design and simulate using LogicWork.

 

2.1 Defining Problem


 Addition and subtraction are operations that are needed to design in this project. The carry look ahead principle is applied to them. The problem says: there are two inputs values for each value of them has 8 bites. 

2.1.1 The 8-bits Binary Addition and Subtraction

Let ( A=A7A6A5A4A3A2A1A0) and (B=B7B6B5B4B3B2B1B0) values each one of 8 bits are added. And let the result from this operation (S=S7S6S5S4S3S2S1S0) and let the carry that may be produced (C=C8C7C6C5C4C3C2C1). The C0 has two majors. It works as an input and mode (change the operations between addition and subtraction).
Col#
n-1
i
2
1
0
carry
Cn-1
Ci
C2
C1
C0

An-1
Ai
A2
A1
A0

Bn-1
Bi
B2
B1
B0





Sn
Sn-1
Si
S2
S1
S0

The maximum value of 8-bits is 28=256 when all the 8-bits filled by 1. When the 8-bits are 0’s, the value is the minimum.
(00000000)2 = (0)10 min-value
 (11111111)2 = (256)10 max-value
The result of any value of A that is added to min-value equals to A. in this case, S=A and C=0. Example2.1: add & subtract
Subtract:
A=11001100
B=10101010
S=00100010
S9=0
Add:
A=11001100
B=10101010
S=01110110
S9=1

Let       A=1100110011, B=10101010

C=10001000
C0=0
C0=1
C=10001000

 








2.2 Design 8-bits CLA

Truth table, Karnaugh map (K-map), Boolean expression and design are considered on this section.

2.2.1 Truth Table

The truth table is a way to find Boolean expression. Table 2.2.1 is used to determinate for both asthmatic operations addition/subtraction.
Table 2.2.1 Truth table for designing CLA
i
Ci Ai Bi
Ci+1Si
0
à000
00
1
     001
00
2
     010
01
3
     011
10
4
à100
01
5
     101
10
6
     110
10
7
     111
11

2.2.2 K-map

The K-map helps to get Boolean expression.
Table 2.2.2 K-map to get expression of Carry
Ci\AiBi
00
01
10
11
0
0
0
1
0
1
0
1
1
1

From Table 2.2.2, the carry can be expressed as:
Ci+1=AiBi+Ci(AiÅBi)…………(2.2.1)
Note: the current carry depends to pervious carry and the inputs values.
Table 2.2.3 K-map to get expression of sum
Ci\AiBi
00
01
10
11
0
0
1
0
1
1
1
0
1
0

From Table 2.2.3, the sum can be expressed as:
Si=Ci Å Ai Å Bi …………(2.2.2)

Let:
AiÅBi= Pi  ……………....(2.2.3)
And,
AiBi= Gi …………………..(2.2.4)
From expressions (2.2.3) and (2.2.3), the expressions (2.2.1) and (2.2.2) can be modified as:
Ci+1=Gi+CiPi ……………(2.2.5)
Si=Ci Å Pi ……………….(2.2.6)

2.2.3 Design Using LogicWork software


Figure 2.2.1 The final design of CLA using LogicWork software




Chapter3: CLA Simulation


The Figure 2.2.1 shows CLA which was completely tested and it worked functionally. In this chapter, the design will be tested and simulated for different type of values. Screen shots will be taken in each test.

3.1 Addition

Two testes are tried.
Note: at those testes the M=0.

3.1.1TEST 

ADD: 54 with 30
(54)10+ (30)10=(84)10=(00110110)2+(00011110)2 =(01010100)2




Figure 3.1.1 ADD:54,30 using CLA circuit (TEST3.1.1)


 3.1.2TEST 

ADD: 254 with 256
(254)10+ (255)10=(509)10=(111111110)2+(11111111)2 =(11111101)2 with carry out


Figure 3.1.2 ADD: 254 with 256 (TEST3.1.2)

 

 

3.2 Subtraction

Two testes are tried.
Note: at those testes the M=1.

3.2.2TEST 

SUB:54, 30
(54)10- (30)10=(24)10=(00110110)2-(00011110)2 =(00001000)2
Figure 3.2.1 SUB: 54, 30(TEST3.2.1)


3.2.2TEST 

SUB:254, 255
 (254)10 -(255)10=(-1)10=(111111110)2-(11111111)2 =(11111111)2’s=(00000001)2

    Figure3.2.2: SUB:254,255(TEST3.2.2)

Conclusion:

Solving problem, Designing, test and simulation have been conducted. The design of CLA is successfully worked and checked by Dr. Tariq Jamel.
This project helps me to understand one of the most important topics in course of Computer Organization and Architecture (ECCE5232. Moreover, good skills: search knowledge from books and World wild Web, solving problem, designing and testing errors can be added to me as an engineer.
If fact, the design requires 16 AND gates, 8 OR gates and 16 XOR gates. It is unlike the expansion technique (method that depends only on carry C0, Gi and Pi) which more gates. The expansion technique is fast but expansive comparing to other which is slower but cheap. The economic issue and fast machine are important factors that must be considered in any design. The design in this project is considered to be cheap and the fastness is not important in small circuit.
The improvements of the design are used expansion technique which is more reliable for a big circuit. Also, using IC’s chips (which consists more gates in one chip) is better than using single gate that did not found in the regular market.















References


[1] William Stallinge, Computer   Organization and Architecture, sixth edition
[2]Handout of course ECCE5232, 2011, by Dr.Tariq Jamel, SQU