목록Verilog (23)
Kraklog

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC 설계 목표 : D 플립 플롭 (master slave) module part3 ( input clk, input [1:0] SW, output LEDR ); reg Qm; reg Qs; always @(posedge ~clk) begin Qm

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC module part2 ( input[1:0]SW, outputLEDR ); D_latch uD0 ( .clk(SW[0] ), .D(SW[1]), .Q(LEDR) ); endmodule latch( 2023.12.19 - [[Harman] 하만 반도체 설계/CPU설계] - [Verilog_LAB3] Part1 )

프로그램 : 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..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC `define BUS_SIZE 2 `define SL_SIZE 10//switch LED size `define SEG7_WD7 module part5( input[`SL_SIZE-1:0]SW, // output [`SL_SIZE-1:0] LEDR , output [`SEG7_WD-1:0] HEX0 , output [`SEG7_WD-1:0] HEX1 , output [`SEG7_WD-1:0] HEX2 , output [`SEG7_WD-1:0] HEX3 , output [`SEG7_WD-1:0] HEX4 , output [`SEG7_WD-1:0] HEX5 ); wire [3:0]..

프로그램 : Quaturs Prime lite edition 18.1 사용문법 : Verilog 2001 보드 : DE1-SOC 설계목표 : PartII(2023.12.19 - [[Harman] 하만 반도체 설계/CPU설계] - [Verilog_LAB2] Part2) 에서 사용한 Full adder를 이용해서 segment에 덧셈을 표현. LED 가장 우측(LED9)에 error bit를 표현한다. `define BUS_SIZE 2 `define SL_SIZE 10//switch LED size `define SEG7_WD7 module part4( input[`SL_SIZE-1:0]SW, output [`SL_SIZE-1:0] LEDR , output [`SEG7_WD-1:0] HEX0 , output..

설계목표 : 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 설계 목표 : 비교기를 통해 9보다 높으면 d1 (HEX1) 에, 그보다 낮으면 d0 (HEX0)에 출력하여 표시한다. -여태 설계한 MUX를 통해서 구별을 해준다. `define BUS_SIZE 2 `define SL_SIZE 10//switch LED size `define SEG7_WD7 module part2 ( input[`SL_SIZE-1:0]SW, output [`SL_SIZE-1:0] LEDR , output[`SEG7_WD-1:0]HEX0, output[`SEG7_WD-1:0]HEX1 ); wire [3:0] V; wire [3:0] A; wire [3:0] B..