본문 바로가기

All Posts79

[Linux] grep 목차 grep의 종류grep은 3가지 종류가 있습니다. egrp은 정규표현식만으로 검색하는 것이고, fgrep은 문자열로 검색하는 grep을 말하며 각각 grep의 -E, -F 옵션을 사용했을 때와 결과는 같습니다.명령어설명정규표현식 사용grep다중 패턴을 검색합니다.Oegrep정규 표현식 패턴으로 검색합니다.Ofgrep문자열 패턴으로 검색합니다.Xgrep 옵션-c : 일치하는 행의 수를 출력합니다.-i : 대소문자를 구별하지 않습니다.-v : 일치하지 않는 행만 출력합니다.-n : 포함된 행의 번호를 함께 출력합니다.-l : 패턴이 포함된 파일의 이름을 출력합니다.-w : 단어와 일치하는 행만 출력합니다.-x : 라인과 일치하는 행만 출력합니다.-r : 하위 디렉토리를 포함한 모든 파일에서 검색합니다... 2025. 4. 9.
[System Verilog] Mailbox? 목차 Mailbox?Similar to an unlimited FIFOSemaphore는 key를 이용해 Data Access를 제어하지만, Mailbox는 Data를 가지고 있다가 전달NameDescriptionfunction new (int bound);Mailbox 생성, bound (> 0)는 mailbox queue의 크기,bound = 0은 무제한의 mailboxfunction int num();Mailbox에 있는 message 수 반환task put (singular message);Mailbox에 message를 put,Mailbox의 공간이 없으면 get() 이전까지 차단task get (ref singular message);Mailbox에서 message 검색,가져올 메시지가 없으면.. 2025. 4. 9.
[Verilog & SV] 시프트 연산자(Shift Operators) 피연산자를 오른쪽 또는 왼쪽으로 이동시키고 크기는 일정하게 유지합니다.>> : 시프트된 비트가 손실되고 벡터가 0으로 채워집니다.>> : 왼쪽 이동 비트가 MSB로 채워집니다.피연산자는 unsigned으로 간주해야 합니다.​a = 4’b1010 b = 4’b10X0Character Operation performed Example Type>>Logical shift rightb >> 1 results 4’b010XBinaryLogical shift lefta Binary>>>Arithmetic shift rightb >>> 1 results 4’b110XBinaryArithmetic shift lefta Binary>>=Logic shift assigna >>= b (a = a >> b)BinaryLog.. 2025. 4. 9.
[Verilog & SV] 논리 연산자(Logical Operators) 목차 Logical Operatorsa = 3’b010 b = 3’b000Character Operation performed Example Type!Logical negation!(a && b) = 1’b1Unary&&Logical and (bothexpressions true)a && b = 1’b0Binary||Logical or (One or bothexpressions true)a || b = 1’b1Binary->Logical implicationexp1 -> exp2 is same with(!exp1 || exp2)BinaryLogical equivalenceexp1 exp2 is same with((exp1->exp2)&&(exp2->exp1))Unary​Logical implicatio.. 2025. 4. 9.
[Verilog & SV] Bitwise, 감소 연산자(Reduction Operators) 목차 Reduction Operator Reduction Operator들은 벡터를 단 하나의 비트로만 줄입니다.Bitwise 연산입니다.If there are the characters Z and X, the result can be a known value.Example​ a = 5’b10101 b = 4’b0011 c = 3’bz00 d = 3’bx011 Character Operation performed Example Type&And all bits&a = 1’b0, &d = 1’b0Unary~&Nand all bits~&a = 1’b1Unary|Or all bits|a = 1’b1, |c = 1’bXUnary~|Nor all bits~|a= 1’b0Unary^Xor all bits^a = 1’.. 2025. 4. 9.
[Verilog & SV] 산술연산자(Arithmetic Operators) 값에 'Z' or 'X'를 사용하면 결과를 알 수 없습니다.​​Verilog Arithmetic OperatorsOperatorDescriptiona + ba plus ba - ​ba minus ba * ba multiplied by ba / ba divided by ba % ba modulo ba ** ba to the power of b​a = 5 b = 10 c = 1 d = ZCharacter Operation performed Example Type+Addb + c = 11Binary-Subtractb - c = 9Binary/Divideb / a = 2Binary* **Multiply, powera * b = 50, a**bBinary%Modulusb % a = 0Binary%=Modulus.. 2025. 4. 9.
[Verilog & SV] 관계 연산자(Relational Operators) 피연산자를 비교하여 1비트 scalar boolean value을 산출합니다.비트 크기가 서로 다르면 더 작은 피연산자가 0으로 확장됩니다.​a = 3’b01 b = 3’b100 c = 3’b111 d = 3’b01z e = 3’b01xCharacter Operation performed Example Type>Greater thana > b = 1’b0BinarySmaller thana Binary>=Greater than or equala >= d = 1’bXBinarySmaller than or equala Binary==Logical equalitya == b = 1’b0Binary!=Logical inequalitya != b = 1’b1b != e = 1’bxBinary===Case (x, z.. 2025. 4. 9.
[Verilog & SV] 비트 연산자(Bitwise Operators) 각 bit 별로 작동하는 연산자입니다.​a = 3‘b101 b = 3‘b110 c = 3‘b01X d = 3‘bz Character Operation performed Example Type~Invert each bit~a = 3’b010, ~d = ‘1bxBinary&And each bitb & c = 3’b010Binary|Or each bita | b = 3’b111Binary^Xor each bita ^ b = 3’b011Binary^~ ~^Xnor each bita ^~ b = 3’b100Binary&= |= ^=Bitwise assignmenta ^= b (a=a^b)Binary 2025. 4. 9.
[Verilog] Case, Synopsys full case, Synopsys parallel case 목차 Syntax case_statement ::=case ( expression )case_item { case_item } endcase| casez ( expression )case_item { case_item } endcase| casex ( expression )case_item { case_item } endcasecase_item ::=expression { , expression } : statement_or_null| default [ : ] statement_or_null casez: 'z', '?' 포함casex: 'x', 'z', '?' 포함 case statement에서 비교는 각 비트가 값 0, 1, x 및 z와 관련하여 정확히 일치해야 합니다. Case 구문은 등가적으로 if.. 2025. 4. 8.
반응형