분류 전체보기 (41) 썸네일형 리스트형 [SystemVerilog] EDA playground Waveform 보는 방법 Revision history: 221125 최초 작성 EDA payground에서 Waverform을 보기 위해서는 크게 2가지를 해줘야 합니다. 1. TestBench 코드에서 initial block내 다음 2가지 추가 $dumpfile("dump.vcd"); $dumpvars(0); 2. Tools & Simulators에서 Open EPWave after run을 체크 Waveform 테스트를 위한 TestBench 작성 // Testbench module tb(); wire [1:0] a; reg c; reg d; assign #10 a = c + d; initial begin // Dump waves $dumpfile("dump.vcd"); $dumpvars(0); $display ("");.. [SystemVerilog] extern function Revision history: 221124 최초 작성 테스트밴치 예제 코드 module tb(); class C #(int p = 1); // Class C의 parameter는 p이고 기본값은 1 extern static function int f(); // extern을 사용하여 f()함수를 외부에서 implementation endclass // Class C 끝 function int C::f(); // 함수를 만드는데 C Class의 f()함수를 implemenation return p + p; // 기능은 p + p endfunction // C Class의 f()함수 끝 initial begin $display("%0d \n%0d", C#()::f(),C#(5)::f()); end 결과 2.. [Verilog] >>, <<, >>>, <<< 연산자 시뮬레이션 결과 Revision history: 220928 최초 작성 Verilog에서 >>, >' 연산자를 사용하면 MSB에 0이 채워지고 w_val에 '>>>' 연산자를 사용하면 MSB에 Singed bit로 채워진다. 그외 시뮬레이션 wire signed [3:0] w_val = 4'b0011 ; wire [3:0] w_val_0 ; wire [3:0] w_val_1 ; wire [3:0] w_val_2 ; wire [3:0] w_val_3 ; wire [3:0] w_val_4 ; wire [3:0] w_val_5 ; wire [3:0] w_val_6 ; wire [3:0] w_val_7 ; assign w_val_0 = w_val >> 0 ; assign w_val_1 = w_val >> 1 ; assign w.. Representing negative integers, 2’s complement Revision history: 220928 최초 작성 Signed integers: 2’s complement -A의 표현 - A = 0 - A = (-1 + 1) - A = (-1 - A) + 1 = ~ A + 1 예) -1을 4-bit 2’s complement로 표현하면 1 = b0001 ~b0001 = b1110 ~b0001 + 1 = b1111 즉 -1 = b1111 예) -1을 8-bit 2’s complement로 표현하면 4-bit 2’s complement결과값에서 부호비트와 동일한 값을 왼쪽에 4개를 추가하여 표현 가능 4-bit 2’s complement결과값 b1111의 부호비트는 1임으로 제일 왼쪽에 1 4개를 추가 -1 = b11111111 예) -5을 8-bit 2’s com.. 다수의 Clock domain을 사용하지 않는 방법 Revision history: 220928 최초 작성 참조: https://web.mit.edu/6.111/www/f2017/handouts/L07a.pdf 위 그림과 같이 clock을 분주하여 여러개의 clock domain을 만들게되면 클럭마다 sync를 맞추기 어려워짐으로 timing 특성이 안좋아진다. 해결방법은 아래 그림과 같이 enb라는 신호를 만들어 enb가 1일때 동작을 기술하면 된다. 따라서 D-FF의 clock은 원래 사용하던 clk(clock domain은 1개)를 사용하면 된다. always @(posedge clk) begin if(resetn == 1'b0) begin // 리셋 동작 기술 end else if(enb8)begin // enb8이 1이 됐을대 동작 기술 end .. Clock Skew Revision history: 220928 최초 작성 참조: Adapted from J. Rabaey, A. Chandrakasan, B. Nikolic, “Digital Integrated Circuits: A Design Perspective” Copyright 2003 Prentice Hall/Pearson. https://web.mit.edu/6.111/www/f2017/handouts/L04.pdf Skew의 정의는 위 그림과 같은 회로가 있을때 clk1의 rising edge 시간과 clk2의 rising edge시간을 뺀것으로 정의된다. CLK소스까지의 위치와 R1, R2, R3의 위치에 따라 Negative skew또는 Positive skew가 발생할 수 있다. 위 그림에서 CLK가 R.. [용어] Contamination delay, Propagation delay Revision: 220928 최초 작성 참조: https://www.sciencedirect.com/topics/computer-science/contamination-delay Contamination Delay - an overview | ScienceDirect Topics Together, the above four properties warrant deterministic behavior of circuits independently from low-level details.10 Synchronous designs do not rely on delay tuning in any way. What matters for functional correctness are the data operatio.. [IO 입출력 전압 허용 범위] 데이터시트 Vol, VoH, VDD, VOL, VIL, VIH, VOH, VDD의미 Revision 220923: 최초 작성 참조: https://web.mit.edu/6.111/www/f2017/handouts/L01.pdfhttps://toshiba.semicon-storage.com/ap-en/semiconductor/knowledge/e-learning/cmos-logic-basics/chap4/chap4-2-1.htmlhttps://www.egr.msu.edu/classes/ece410/mason/files/Ch7.pdf Reading datasheets: Input voltages (V(IH) and V(IL)) | Toshiba Electronic Devices & Storage Corporation | Asia-English The information presented .. 이전 1 2 3 4 ··· 6 다음