基于网络编码的多信源组播通信系统,包括源代码,原理图等
// it has been decoded,decode the next packet
state_next = GET_SRC_GEN_NUM;
else begin
cmp_data = {src_num_sel,gen_num_sel,12'hfff};
cmp_data_mask_0 = {12'h0,CMP_DATA_MASK};
cmp_data_mask_1 = {12'h0,CMP_DATA_MASK};
cmp_data_mask_2 = {12'h0,CMP_DATA_MASK};
state_next = GET_CMP_RESLT_FIRST;
end
end
GET_CMP_RESLT_FIRST: begin
cam_lookup_reslt_next = {match_2,match_1,match_0};
cmp_data = {12'hfff,src_num_sel,gen_num_sel};
cmp_data_mask_0 = {CMP_DATA_MASK,12'h0};
cmp_data_mask_1 = {CMP_DATA_MASK,12'h0};
cmp_data_mask_2 = {CMP_DATA_MASK,12'h0};
state_next = GET_CMP_RESLT_SEC;
match_addr_temp_2_next = match_addr_2;
match_addr_temp_1_next = match_addr_1;
match_addr_temp_0_next = match_addr_0;
end
/* get the address from the cams, if there are two adresses from
* the cams, then outputs the one to the DRAM control and save
* the other for later use. If there is no valid address, we could not
* decode, then get out and decode the next one */
GET_CMP_RESLT_SEC: begin
state_next = RD_DRAM_MAIN_STEP;
cam_lookup_reslt_next = cam_lookup_reslt | {match_2,match_1,match_0};
cam_lookup_reslt_pre_next = cam_lookup_reslt | {match_2,match_1,match_0};
cam_lookup_reslt_save_next = cam_lookup_reslt | {match_2,match_1,match_0};
if(match_2) begin
match_addr_temp_2_next = match_addr_2;
end
if(match_1) begin
match_addr_temp_1_next = match_addr_1;
end
if(match_0) begin
match_addr_temp_0_next = match_addr_0;
end
end
/* reads the DRAM accroding to the CAM's address, then updates the look
* up result */
RD_DRAM_MAIN_STEP:
if(rd_idle) begin
if(|cam_lookup_reslt) begin
if(cam_lookup_reslt==3'b101) begin
other_dram_addr_next = match_addr_temp_2;
other_port_num_rd_next = 2'b10;
has_factor2_next = 1;
addr_vld = 1;
block_num_rd = match_addr_temp_0;
port_num_rd = 0;
cam_lookup_reslt_next = 3'b100;
end
else if (cam_lookup_reslt == 3'b011) begin
other_dram_addr_next = match_addr_temp_1;
other_port_num_rd_next = 2'b01;
has_factor2_next = 1;
addr_vld = 1;
block_num_rd = match_addr_temp_0;
port_num_rd = 0;
cam_lookup_reslt_next = 3'b010;
end
else if (cam_lookup_reslt==3'b110) begin
other_dram_addr_next = match_addr_temp_2;
other_port_num_rd_next = 2'b10;
has_factor2_next = 1;
addr_vld = 1;
block_num_rd = match_addr_temp_1;
port_num_rd = 2'b01;
cam_lookup_reslt_next=3'b100;
end
else if (cam_lookup_reslt==3'b001) begin
has_factor2_next = 0;
addr_vld = 1;
block_num_rd = match_addr_0;
port_num_rd = 2'b00;
cam_lookup_reslt_next = 0;
end
else if (cam_lookup_reslt==3'b010) begin
has_factor2_next = 0;
addr_vld = 1;
block_num_rd = match_addr_1;
port_num_rd = 2'b01;
cam_lookup_reslt_next = 0;
end
else if (cam_lookup_reslt==3'b100) begin
has_factor2_next = 0;
addr_vld = 1;
block_num_rd = match_addr_2;
port_num_rd = 2'b10;
cam_lookup_reslt_next = 0;
end
state_next=LUP_DCOD_FACTOR1_FIRST;
- 一种基于电力线的家庭以太网络实现方法(10-10)
- 基于DSP和FPGA的机器人声控系统设计与实现 (04-16)
- 面向大众市场的千兆位级收发器(05-04)
- 利用以太网硬件在环路实现高带宽DSP仿真(05-04)
- 采用软处理器IP规避器件过时的挑战(05-04)
- WCDMA系统基带处理的DSP FPGA实现方案(01-02)