Carry Look-ahead Adder Design

Carry Look-ahead Adder(캐리 예측 덧셈기)
 전가산기를 이용한 Ripple Carry Adder는 많은 bit의 연산을 하려고 할 때
지연되는 시간이 길어지는 단점을 갖는다.
 CLA(Carry Look-ahead Adder)의 경우는 carry의 발생을 bit입력시
바로 계산하여 시간의 지연 없이 바로 덧셈연산을 수행할 수 있는 장점을 갖는다.
 * 참고: http://en.wikipedia.org/wiki/Carry_lookahead_adder

< RTL(Register Transfer Level) Schematic >

사용자 삽입 이미지
사용자 삽입 이미지

크리에이티브 커먼즈 라이센스
Creative Commons License

"HDL" 카테고리의 다른 글

Posted by downright

2009/04/10 19:44 2009/04/10 19:44

Leave a comment
[로그인][오픈아이디란?]

9. 다항식 연산, 해

가. 다항식 값 구하기polyval(배열연산), polyvalm(행렬연산)
    예) >>func=[1,-3,2,1];
         >>x=10;
         >>y=polyval(func,x) %x^3-3*x^2+2*x+1
         y= 721
         >>x2=[5,6,7];
         >>y2=polyval(func,x2)
         y2= 61, 121, 211
         >>x3=[1,2,3;4,5,6;7,8,9];
         >>y3=polyval(func,x3)
         y3=  1     1     7
             25    61   121
            211   337   505
         >>y4=polyvalm(func,x3) %Matrix must be square
         y4=  381         472         564
               872        1073        1272
             1364        1672        1981

나. 다항식의 산술 연산
-> + : 덧셈, - : 뺄셈, conv(a,b) : 곱셈, deconv(a,b) : 나눗셈,
                                       [R,P,K] = residue(f,g): 부분 분수 전개(R:나머지, P:극, K항)
    예) >>a=[1,2,3];                     예) >>f=[1,5,9,7];    % x^3+5*x^2+9*x+7
         >>b=[4,5,6];                          >>g=[1,3,2];     % x^2+3*x+2
         >>c= conv(a,b)                      >>[R,P,K]=residue(f,g)
         c= 4 13 28 27 18                      R= -1 ; 2
         >>deconv(c,a)                      P= -2 ; -1
         ans= 4, 5, 6                           K= 1 2           % -1/(x-(-2)) + 2/(x-(-1)) + x + 2

다. 다항식의 해 구하기
roots(coeff)
    예) >>func=[1,-3,-1,3];
         >>p=roots(func)
         p= 3.0000 ; 1.0000 ; -1.0000
    예) >>func=[1,-2,-3,4];
         >>s=roots(func)
         s= -1.6506         
             -0.1747 + 1.5469i
             -0.1747 - 1.5469i

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by downright

2008/01/09 11:13 2008/01/09 11:13

Leave a comment
[로그인][오픈아이디란?]

6. 행렬 연산

가. 전치 행렬transpose(A) 또는 A’, (ctranspose: 켤레 복소수의 전치 행렬)
    예) >> A=[1,2,3;4,5,6;7,8,9];
         >> transpose(A)
         ans = [1,4,7;2,5,8;3,6,9]

나. 역행렬inv(A)

다. 행렬식det(A)
    예) >> syms k1, k2, k3
         >> k = [(k1+k2+k3),-(k2+k3);-k3,(k2+k3)]
         k = [ k1+k2+k3,   -k2-k3]
              [      -k3,    k2+k3]
         >> det(k)
         ans = k1*k2+k1*k3+k2^2+k2*k3

라. 계수rank(A) : 원래 행렬의 행이나 열의 수에서 reduced row echelon form 행렬에서 행의
                            요소가 모두 0인 행의 수를 뺀 값. (rref : reduced row echelon form 행렬 생성)
   예) >> a=[1,-2,3;2,-5,1;1,-4,-7]
        >> rank(a)
        ans = 2
        >> rref(a)
        ans = [1,0,13;0,1,5;0,0,0] %rref에서 행의 요소가 모두 0인 행은 3행 뿐임.

마. tracetrace(A) : 행렬의 대각 요소의 합

바. 대각 행렬diag(A) : 대각 성분을 제외한 모든 요소가 0인 행렬

사. 삼각 인수 분해
     1. [L,U,P] = lu(A). (L: 하삼각 행렬, U: 상삼각 행렬, P:순열 행렬), PA = LU
     2. [Lp U] = lu(A). (Lp: permuted 하삼각 행렬, U: 상삼각 행렬), Lp = inv(P)*L

아. 직교 인수 분해 – [Q,R,E] = qr(A) (Q: unitary 행렬, R: 상삼각 행렬, E: 순열행렬), AE = QR

자. Cholesky 인수 분해 – [R,p,S] = chol(A) (R: 상삼각 행렬)

차. 고유치와 고유 벡터 – [X,lamda] = eig(A), (X: 고유벡터, lamda: 고유치)
     - A*X = lamda*X, X가 0이 아닌 해를 갖기 위한 lamda 값을 고유치, X를 고유벡터라 함.
     - (A-lamda*I)X = 0, det(A-lamda*I) = 0, (poly: 행렬의 특성 방정식)

카. 놈(norm)
    1. 벡터 norm – norm(x,p): sum(abs(x).^p)^(1/p)와 같음. norm(x,inf) = max(abs(x))
    2. 행렬 norm – norm(A,1): 열의 절대값의 합 중 가장 큰 값, max(sum(abs(A)))와 같음.
                         norm(A,inf): 행의 절대값의 합 중 가장 큰 값, max(sum(abs(A’)))
                         norm(A,’fro’): 모든 요소의 제곱의 합에 대한 제곱근, sqrt(sum(diag(A’*A)))
                         norm(A) 또는 norm(A,2): 행렬 A의 가장 큰 singular value, max(svd(A))

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by downright

2008/01/03 22:39 2008/01/03 22:39

Comments List

  1. 눈e이뿐이lol  2008/02/29 00:19 # M/D Reply Permalink

    답글 보고 블로그에 오게 되었는데 조회수가 굉장하네요. 그리고 수학도 잘하시나봐요. 부럽습니다. +_+ 전공도 저와 비슷한 이과 계열이신듯 하신데 앞으로 좋은 인연 만들어 보아요. ㅎ

    1. downright  2008/02/29 00:36 # M/D Permalink

      굉장하다뇨^^..한가지 팁(?)을 알려드리자면,
      저는 네이버에 등록했구요.(잘 해주는 것 같아요.)
      올블로그넷이랑 블로그코리아도 등록했어요.
      다음은 안했는데 거기에도 등록하면 방문자가 많을 거에요.
      아 그리고 저는 공대생...잘 한다기 보다 피할 수 없는 운명(?)인가봐요.^^

Leave a comment
[로그인][오픈아이디란?]

Logic Gate - 논리 회로

논리 회로는 불 대수(논리 연산)를 실시하는 회로 또는 디지탈 신호를 기억하는 회로 혹은 두가지 기능을 가지는 디지털 회로이다.

A logic gate takes one or more logic-level inputs and produces a single logic-level output. Because the output is also a logic level, an output of one logic gate can connect to the input of one or more other logic gates.

In electronic logic, a logic level is represented by a certain voltage (which depends on the type of electronic logic in use). Each logic gate requires power so that it can source and sink currents to achieve the correct output voltage. In logic circuit diagrams the power is not shown, but in a full electronic schematic, power connections are required. There are 7 positive logic gates and each gate has two laws or rules.

사용자 삽입 이미지

논리 회로의 설계
논리 회로의 설계는 논리식이나 진리표가 사용된다.
좀더 회로도적인 표기 수단으로 MIL 기호 등 논리 소자
기호가 사용되었다.

1960년대에 등장한 표준 논리 IC (TI의 7400 시리즈)에
의하여 아날로그 회로 설계와 논리 설계를 분리하여
단순하게 구현이 가능하게 되었다.

작은 규모에서는 논리 소자 기호로 설계가 가능하지만,
큰 규모가되면 힘들어 진다. 그렇기 때문에 1990년대부터
대규모 회로 설계에는 하드웨어 기술 언어가 사용되고
있다. 그리고 집적 회로 기술의 발전에 대응할 수 있도록
다양한 모델에 적용이 가능한 독립적인 모델(동작 기술)을
사용하여 설계한다.

1990년대 후반에는 개발품의 경우 논리 회로 프로그램을 이용하여 PLD, CPLD, FPGA을 사용하였다. 양산품이나 고성능이 요구될 경우 ASIC를 사용하기도 했다.

Logic gates and hardware
NAND and NOR logic gates are the two pillars of logic, in that all other types of Boolean logic gates (i.e., AND, OR, NOT, XOR, XNOR) can be created from a suitable network of just NAND or just NOR gate(s). They can be built from relays or transistors, or any other technology that can create an inverter and a two-input AND or OR gate. Hence the NAND and NOR gates are called the universal gates.

DeMorgan equivalent symbols
By use of De Morgan's theorem, an AND gate can be turned into an OR gate by inverting the sense of the logic at its inputs and outputs. This leads to a separate set of symbols with inverted inputs and the opposite core symbol. These symbols can make circuit diagrams for circuits using active low signals much clearer and help to show accidental connection of an active high output to an active low input or vice-versa.

Storage of bits
Related to the concept of logic gates (and also built from them) is the idea of storing a bit of information. The gates discussed up to here cannot store a value: when the inputs change, the outputs immediately react. It is possible to make a storage element either through a capacitor (which stores charge due to its physical properties) or by feedback. Connecting the output of a gate to the input causes it to be put through the logic again, and choosing the feedback correctly allows it to be preserved or modified through the use of other inputs. A set of gates arranged in this fashion is known as a "latch", and more complicated designs that utilise clocks (signals that oscillate with a known period) and change only on the rising edge are called edge-triggered "flip-flops". The combination of multiple flip-flops in parallel, to store a multiple-bit value, is known as a register. When using any of these gate setups the overall system has memory; it is then called a sequential system since its output can be influenced by its previous state(s).

These registers or capacitor-based circuits are known as computer memory. They vary in performance, based on factors of speed, complexity, and reliability of storage, and many different types of designs are used based on the application.

출처: 위키사전(logic gate), 위키사전(논리회로)

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by downright

2007/10/19 00:09 2007/10/19 00:09

Leave a comment
[로그인][오픈아이디란?]