본문 바로가기

[Harman] 반도체 설계

(60)
Quartus II project - Verilog HDL Design pptx.
Quartus II project - Uart Rx Segment [2]. `include"../simple_uart_tx/simple_uart_tx.v" module simple_uart_rx ( input clk, input reset_n, input rx, output [7:0] rx_data ); localparam IDLE = 0; localparam START = 1; localparam MID = 2; localparam D0 = 3; localparam D1 = 4; localparam D2 = 5; localparam D3 = 6; localparam D4 = 7; localparam D5 = 8; localparam D6 = 9; localparam D7 = 10; localparam STOP = 11; localparam STOP_1 = 12; reg rx_..
Quartus II project - Uart Rx Segment [1]. `include "../lab3_2/seven_segment_cntrl.v" `include "../simple_uart_rx/simple_uart_rx.v" module rx_seg( input clk, input reset_n, input rx, output seg_a, seg_b, seg_c, seg_d, seg_e, seg_f, seg_g, output seg_h, seg_i, seg_j, seg_k, seg_l, seg_m, seg_n ); wire [7:0] rxtx; simple_uart_rx uSimple_rx( .clk(clk), .reset_n(reset_n), .rx(rx), .rx_data(rxtx) ); seven_segment_cntrl uSeven_segment_cntrl1( ..
Quartus II project - Simple Uart Rx. Internal Loop-Back : 이전에 설계했던 SimpleUartTx 의 ASCII code 'X' 를 Rx 가 제대로 수신하는지만 확인한다. (Simulation Only) Clk : DE1 - SoC Board 의 default freqency 는 50Mhz 로 20ns 의 Clock Period 를 가진다. Bit Rate 115200bps 를 만족하기 위해선 1 Bit 를 전송할 때, 8680ns 가 필요하고 20ns 의 주기가 434 cycles 유지되어야 한다. f_det : Uart 는 기본적으로 IDLE 과 STOP 에서 1, START 에서 0 의 값을 가진다. Clock Signal 이 존재하는 않는 Asychronous system 에서 Data 의 송수신이 이뤄지기 위해 ST..
Quartus II Project - Falling Edge Detection. d_ff 을 통해서 Falling Edge 를 파악하고, Data 송수신의 Start bit 를 확인할 수 있다. module fdet( input clk, input reset_n, input rx, output f_det ); reg rx_reg; reg rx_delay1; reg rx_delay2; always @(posedge clk, negedge reset_n) begin if(!reset_n) begin rx_delay1
Quartus II Project - notes [2] Always / Initial Blocks (Procedural Assignments) 1. initial - each 'initial' blocks executes concurrently starting at time 0. - executes only 'once' and does not execute again. module system; reg a, b, c, d; // single statement initial a = 1'b0; // time 0 : power ON initial begin b = 1'b1; #5 c = 1'b0; #10 d = 1'b0; end initial #20 $finish; endmodule 2. always - each 'always' blocks executes con..
Quartus II project - notes [1]
Quartus II project - Simple Uart Tx. BPS : 115200 DE1-SoC Board default Frequency : 50Mhz [20ns] 1/115200 = 0.00000868s = 0.00868ms = 8.68us = 8680ns [1bit] need to maintain 434 cycles to make 8680ns. // 434 counter = 8680ns reg [3:0] cst; //idle ~ stop_1, 12 state reg [3:0] nst; reg [8:0] clk_count; // 512, 9bit always @(posedge clk, negedge reset_n) begin if(!reset_n) begin // active low clk_count