'sd_o'는 들어오는 데이터 'data_reg_o[DATA_WIDTH - 1]'의 최상위 비트(MSB) 값을 사용 //Parallel to serial conversion of incoming data always @ (negedge i_sys_clk or posedge i_sys_rst) begin if(i_sys_rst) begin sd_o
wr_count_i가 DATA_WIDTH - 1 값에 도달하고 신호 ws_i가 LOW(0) 데이터 레지스터 data_reg_i에 오른쪽 채널 데이터(right_data_i) 할당 wr_count_i가 DATA_WIDTH - 1 값에 도달하고 신호 ws_i가 HIGH(1) 데이터 레지스터 data_reg_i에 왼쪽 채널 데이터(left_data_i)가 할당 위의 조건 중 어느 것도 충족되지 않으면 데이터 레지스터 'data_reg_i'는 오른쪽 시프트를 수행하여 최상위 비트(MSB)를 두 번째 최상위 비트로 이동하고 이전 MSB 값으로 최하위 비트(LSB)를 채웁니다. SerialData.v module SerialData#( parameter DATA_WIDTH=16 ) ( input i_sys_clk,..
module count #( parameter DATA_WIDTH=16 ) ( input i_sys_clk, input i_sys_rst, output reg [DATA_WIDTH-1:0] wr_count_o, output reg ws_o ); //Count the number of bits to be transmitted //It has to be same as the data width always @ (negedge i_sys_clk or posedge i_sys_rst) begin if(i_sys_rst) begin wr_count_o
DATA_WIDTH 만큼 count module count #( parameter DATA_WIDTH=16 ) ( input i_sys_clk, input i_sys_rst, output reg [DATA_WIDTH-1:0] wr_count_o ); //Count the number of bits to be transmitted //It has to be same as the data width always @ (negedge i_sys_clk or posedge i_sys_rst) begin if(i_sys_rst) begin wr_count_o
1's Complement module Complement #( parameter DATA_WIDTH=16 ) ( input i_sys_clk, input i_sys_rst, input [DATA_WIDTH-1:0] i_left_data, input [DATA_WIDTH-1:0] i_right_data, output reg [DATA_WIDTH-1:0] o_left_data_ones_compl, output reg [DATA_WIDTH-1:0] o_right_data_ones_compl ); // 1's Complement always @ (posedge i_sys_clk or posedge i_sys_rst) if(i_sys_rst) o_left_data_ones_compl
Verilog에서 데이터 유형은 모듈 내에서 내부 신호 및 변수를 선언하는 데 사용됩니다. Nets, register 및 기타 데이터 유형으로 분류할 수 있습니다. Nets (wire, tri, wor, etc.) Net은 설계에서 구성 요소 간의 물리적 연결을 나타내는 데 사용되며 값을 저장하지 않습니다. wire : 단일 소스로 구동할 수 있는 기본 1비트 또는 다중 비트 연결입니다. tri : 여러 소스에 의해 구동될 수 있는 1비트 또는 다중 비트 연결. wor : 여러 소스에 의해 구동될 때 비트가 함께 OR되는 1비트 또는 다중 비트 연결. triand, trior, tri0, tri1 등: 특정 특성을 가진 기타 특수 네트 유형. Registers (reg, integer, time, etc..