본문 바로가기

Language32

[Verilog] Sequential/parallel block 목차Sequential block(순차블록): begin-endDeclaration of data, local parameter, parameter, let, and statementsr은 순차적으로 #d마다 변화합니다.parameter d = 50;reg [7:0] r; // a waveform controlled begin // by sequential delay #d r = ’h35; #d r = ’hE2; #d r = ’h00; #d r = ’hF7; #d -> end_wave;// trigger an event // called end_waveend Parallel block(병렬블록): fork-joinThe timin.. 2025. 1. 28.
[System Verilog] 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’.. 2024. 11. 16.
[Perl] =>, -> 목차->참조(ref)에 사용합니다.=>hash의 list를 나타낼때 사용합니다. (Fat comma) Example12345my %atomicWeights = ("Hydrogen" => 1.008, "Helium" => 4.003, "Manganese" => 54.94); my $hashRef = \%atomicWeights; print $hashRef->{"Helium"};Colored by Color Scriptercs" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스Result4.003Interpreta.. 2024. 11. 11.
[Perl] BEGIN Block 목차 BEGIN Block BEGIN 블럭은 해당 블럭의 Parsing이  끝나면 바로 실행됩니다. 파일의 나머지 부분의 Parsing이 채끝나지 않았더라도 실행됩니다. 실행 시간에는 무시됩니다. BEGIN 블럭이 여러개 있다면, compiler가 위에서 아래로 만나는 순서대로 실행합니다. BEGIN문을 조건문 안에 두었더라도 가장 먼저 실행 됩니다. 조건문 내부에 쓰지 않는것이 좋습니다.(조건문 작동 X) Compile 중에 조건에 따라 어떤 작동을 하고 싶다면, BEGIN 블록 내에 조건문을 두면 됩니다.Example12345678910use strict;use warnings; ​ print "This gets printed s.. 2024. 11. 10.
[Verilog Problem] NOR Gate Problem descriptionmodule은 TOP이고 Input inA, inB Output out를 가지고 있습니다.inA와 inB는 NOR Gate를 통해 out으로 나갑니다.Codemodule TOP ( input inA, input inB, output out); assign out=~(inA|inB);endmoduleDescription"|"는 bit, "||"는 논리 연산자 입니다."~|"은 NOR bit 연산자 입니다. 2024. 5. 24.
[Verilog Problem] XNOR Gate Problem descriptionmodule은 TOP이고 Input inA, inB Output out를 가지고 있습니다.inA와 inB는 XNOR Gate를 통해 out으로 나갑니다.Codemodule TOP ( input inA, input inB, output out); assign out=~(inA^inB);//assign out = inA~^inB;endmoduleDescription"^" XOR bit 연산자입니다."~^", "^~" XNOR bit 연산자입니다. 2024. 5. 24.
반응형