新闻中心

EEPW首页>电源与新能源>设计应用> 基于网络编码的多信源组播通信系统,包括源代码,原理图等(四)

基于网络编码的多信源组播通信系统,包括源代码,原理图等(四)

作者: 时间:2016-12-06 来源:网络 收藏

* the other for later use. If there is no valid address, we could not

本文引用地址://m.amcfsurvey.com/article/201612/326827.htm

* 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;

pkt_vld = 1;

pkt_dcoding = {src_num_sel,gen_num_sel};

end // end-- if(|cam_lookup_reslt)

else

state_next = GET_SRC_GEN_NUM; //could not find the pkt in cams.

end //end--if(rd_idle)

/* waiting for decoding completion, if needs the decoding factor pkt,

* then look up the factor in the remain cams */

LUP_DCOD_FACTOR1_FIRST: begin

if(decod_com) begin

state_next=GET_SRC_GEN_NUM;

end

if(need_pkt_vld) begin // need other packet to decode current packet

if((cam_lookup_reslt^~cam_lookup_reslt_pre)==3'b110) begin

cmp_data = {pkt_need_src_gen,12'hfff};

cmp_data_mask_2 = {12'h0,CMP_DATA_MASK};

cmp_data_mask_1 = {12'h0,CMP_DATA_MASK};



关键词:源代码原理

评论


技术专区

关闭