목록전체 글 (252)
Kraklog

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module simple_uart_rx ( inputclk, inputreset_n, inputrx, output reg[7:0]rx_data ); // rx falling edge detect reg rx_delay1; reg rx_delay2; wire f_edge_det = !rx_delay1 & rx_delay2; always @(posedge clk, negedge reset_n) begin if (!reset_n) begin rx_delay1

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module simple_uart_tx ( input clk , input reset_n , output tx ); localparam idle = 0 , start = 1 , D0 = 2 , D1 = 3 , D2 = 4 , D3 = 5 , D4 = 6 , D5 = 7 , D6 = 8 , D7 = 9 , stop = 10 , stop_1 = 11; reg [3:0] current_state ; reg [3:0] next_state ; reg [8:0] count ; reg rTx ; assign tx=rTx; wire bit_clr = (count == 433); always ..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module mult_control ( inputclk, inputreset_a, inputstart, input[1:0]count, output reg[1:0]input_sel, output reg[1:0]shift_sel, output reg[2:0]state_out, output regdone, output regclk_ena, output regsclr_n ); parameter idle=0, lsb=1, mid=2, msb=3, calc_done=4, err=5; reg [2:0] current_state; reg [2:0] next_state; // state reg..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC Day19. 3bit 7-Segment 이전글 (링크) module seven_segment_cntrl ( input [3:0] inp , output reg seg_a , output reg seg_b , output reg seg_c , output reg seg_d , output reg seg_e , output reg seg_f , output reg seg_g ); always @(*) begin case (inp) //if displayed to segment, add '~' in front of 7'000_0000 for invert it. 4'd1 : {seg_..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module seven_segment_cntrl ( input [2:0] inp , output reg seg_a , output reg seg_b , output reg seg_c , output reg seg_d , output reg seg_e , output reg seg_f , output reg seg_g ); always @(*) begin case (inp) //if displayed to segment, add '~' in front of 7'000_0000 for invert it. 3'b000 : {seg_a,seg_b,seg_c,seg_d,seg_e,seg..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module tb_my_rotate(); reg rotate; reg[15:0] data ; regtmp; always @(*) begin if(rotate) begin//if rotate==1 repeat (8) begin tmp = data[15]; data = {data[14:0], tmp}; end end else begin data = data; end end initial begin rotate = 1'b0; data = 16'hFFAA; #100; rotate = 1'b1; data = 16'hFFAA; #100; end endmodule test bench만 있기..