新聞中心

EEPW首頁 > 電源與新能源 > 設(shè)計應(yīng)用 > 基于網(wǎng)絡(luò)編碼的多信源組播通信系統(tǒng),包括源代碼,原理圖等(四)

基于網(wǎng)絡(luò)編碼的多信源組播通信系統(tǒng),包括源代碼,原理圖等(四)

作者: 時間:2016-12-06 來源:網(wǎng)絡(luò) 收藏

end

本文引用地址:http://m.butianyuan.cn/article/201612/326827.htm

else begin

data_router_packingfifo <= {ctrl_temp2, 1'b0 , data_temp2 }; //MSB = 0 means it is an uncoded pkt

val_router_packingfifo <= 1;

//this is the end of a packet, goto JUDGE

if (& (ctrl_temp2)) begin

router_status <= JUDGE;

end

//this is not the end of a packet, goto GET_DATA2

else begin

router_status <= GET_DATA2;

rd_en_payloadfifo_router_2 <= 1;

counter_getdata <= 0;

end

end

end //state SEND_DATA2 ends GET_DATA1: begin

val_router_packingfifo <= 0; //clear output valid signal

//read-FIFO-delay

if (counter_getdata < 2'b01) begin

counter_getdata <= counter_getdata + 1;

router_status <= GET_DATA1;

rd_en_payloadfifo_router_1 <= 0; //clear rd_en signal

end

else begin

data_temp1 <= data_payloadfifo_router_1;

ctrl_temp1 <= ctrl_payloadfifo_router_1;

rd_en_payloadfifo_router_1 <= 0;

router_status <= SEND_DATA1;

end

end //state GET_DATA1 ends

SEND_DATA1: begin

if (!rdy_router_packingfifo) begin

router_status <= SEND_DATA1;

end

else begin

data_router_packingfifo <= {ctrl_temp1, 1'b0 , data_temp1 }; //MSB = 0 means it is an uncoded pkt

val_router_packingfifo <= 1;

//this is the end of a packet, goto JUDGE

if (& (ctrl_temp1)) begin

router_status <= JUDGE;

end

//this is not the end of a packet, goto GET_DATA1

else begin

router_status <= GET_DATA1;

rd_en_payloadfifo_router_1 <= 1;

counter_getdata <= 0;

end

end

end //state SEND_DATA1 ends

GET_BOTH: begin

first_dword_2 <= 0; //

val_router_multiplier_2 <= 0; //clear valid signal

//read-FIFO-delay

if (counter_getdata < 2'b01) begin

counter_getdata <= counter_getdata + 1;

router_status <= GET_BOTH;

rd_en_payloadfifo_router_1 <= 0;

rd_en_payloadfifo_router_2 <= 0; //clear rd_en signals

end

else begin

data_temp1 <= data_payloadfifo_router_1;

ctrl_temp1 <= ctrl_payloadfifo_router_1;

data_temp2 <= data_payloadfifo_router_2;

ctrl_temp2 <= ctrl_payloadfifo_router_2;

router_status <= SEND_BOTH_1;

end

end //state GET_BOTH ends

//according to the random number generator, data from both

//input channels should be sent out seperately

SEND_BOTH_1: begin

if (!rdy_router_multiplier_1) begin

val_router_multiplier_1 <= 0;

router_status <= SEND_BOTH_1;

end

else



關(guān)鍵詞: 源代碼原理

評論


技術(shù)專區(qū)

關(guān)閉