목록세미콘 (42)
Kraklog

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC 설계목표 : RS래치 생 `define LU2 module part1 ( input clk , input R , input S , `ifdef LU output reg Q `elsif LU2 outputQ `else outputQ `endif ); `ifdef LU always @* begin case ({clk & R,clk & S}) 2'b00: Q = Q; 2'b01: Q = 1'b0; 2'b10: Q = 1'b1; 2'b11: Q = 1'bz; default: Q = 1'bz; endcase end `elsif LU2 wire R_g, S_g, Qa, Qb; assign..

설계목표 : 4비트 전가산기 - carry와 sum을 구별해서 출력시킨다. 더보기 `define BUS_SIZE 2 `define SL_SIZE 10//switch LED size `define SEG7_WD7 module part3( input[`SL_SIZE-1:0]SW, output [`SL_SIZE-1:0] LEDR ); wire [3:0] A = SW[7:4]; wire [3:0] B = SW[3:0]; wire C_i = SW[8]; wire [3:0] S; wire C_o; assign LEDR[4:0] = {C_o,S}; f_Add_4bit uF_Add_4bit( .i_a (A), .i_b (B), .i_Cin (C_i), .o_Sum (S), .o_Crry(C_o) ); endmodule..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC 목표 : 2bit 4x1 multiplexer 설계 top `define BUS_SIZE 2 `define SL_SIZE 10 //`define USE_GNE module part3(SW,LEDR); input [`SL_SIZE-1:0] SW; output [`SL_SIZE-1:0] LEDR; wire [`BUS_SIZE-1:0] U; wire [`BUS_SIZE-1:0] V; wire [`BUS_SIZE-1:0] W; wire [`BUS_SIZE-1:0] X; wire [`BUS_SIZE-1:0] m; wire s1,s0; assign s1 = SW[9]; assign s0 ..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module part1 ( input [9:0] SW , //slide switch output [9:0] LEDR //redLEDs ); assign LEDR=SW; endmodule 스위치에 LED를 할당하여 output

Avalon bus를 활용해 pwm ip를 설계하는것이 목표. Avalon Interface -master 와 slave간 상호 동작을 나타낸 폼 -slave가 보내는 신호는 wait request, readdata 그 외에는 master에서 보내는 신호 -byteenable은 내가 보내는 data 중 일부만 보내고 싶을때 data를 선택하게 한다. `timescale 1ns / 1ns `define APWM module avalon_module ( input clk , input rst , input mp_waitR, //Avalon bus input [31:0]mp_rData, output reg [31:0]mp_addr , output reg [ 3:0] mp_bEn , output reg mp_r..

Avalon Bus 설계 `timescale 1ns / 1ns module avalon_module ( input clk , input rst , input mp_waitR, //Avalon bus input [31:0]mp_rData, output reg [31:0]mp_addr , output reg [ 3:0] mp_bEn , output reg mp_rD, output reg mp_wR , output reg [31:0]mp_wData ); parameter FF = 1; initial begin mp_addr =32'hx; //unknown value mp_bEn =4'bx; mp_rD =1'b0; mp_wR =1'b0; //mp_waitR =; //mp_rData =; mp_wData =32'..

PWM : Pulse Width Modulation, 펄스의 폭을 제어하는 주기 제어방법 New Component - Files (tab) - Add File - Analyze Synthesis 이때 에러는 나오는 에러는 지금은 무시한다. module avalon_pwm ( clk, wr_data, wr_n, addr, clr_n, rd_data, pwm_out ) ; input clk; input [31:0] wr_data; input wr_n; input addr; input clr_n; output [31:0] rd_data; output [7:0] pwm_out; reg [7:0]div3, div2, div1, div0; reg [7:0]duty3, duty2, duty1, duty0; reg [..