新聞中心

        EEPW首頁 > 電源與新能源 > 設計應用 > 基于網絡編碼的多信源組播通信系統,包括源代碼,原理圖等(四)

        基于網絡編碼的多信源組播通信系統,包括源代碼,原理圖等(四)

        作者: 時間:2016-12-06 來源:網絡 收藏

        else begin

        本文引用地址:http://www.104case.com/article/201612/326827.htm

        data_router_multiplier_1 <= data_temp1;

        val_router_multiplier_1 <= 1;

        if (ctrl_temp1 == 8'hff) begin

        first_dword_1 <= 1;

        rand_num_en <= 1;

        end

        else begin

        first_dword_1 <=0;

        rand_num_en <= 0;

        end

        router_status <= SEND_BOTH_2;

        end

        end //state SEND_BOTH_1 ends

        SEND_BOTH_2: begin

        first_dword_1 <= 0;

        val_router_multiplier_1 <= 0; //clear valid signal

        //confirm the first random number is generated successfully

        //before enable to generate the second.

        if (ctrl_temp1 == 8'hff) begin

        if (!rand_num_val) begin

        rand_num_en <= 0;

        router_status <= SEND_BOTH_2;

        end

        end else begin

        if (!rdy_router_multiplier_2) begin

        val_router_multiplier_2 <= 0;

        router_status <= SEND_BOTH_2;

        end

        else begin

        data_router_multiplier_2 <= data_temp2;

        val_router_multiplier_2 <= 1;

        if (ctrl_temp2 == 8'hff) begin

        first_dword_2 <= 1;

        rand_num_en <= 1;

        end

        else begin

        first_dword_2 <= 0;

        rand_num_en <= 0;

        end

        if (((ctrl_temp1 == 8'hf0) && (& (ctrl_temp2))) || ((ctrl_temp2 == 8'hf0) && (& (ctrl_temp1)))) begin

        router_status <= JUDGE;

        end

        else begin

        rd_en_payloadfifo_router_1 <= 1;

        rd_en_payloadfifo_router_2 <= 1;

        counter_getdata <= 0;

        router_status <= GET_BOTH;

        end

        end

        end

        end //state SEND_BOTH_2 ends

        endcase

        end

        end

        endmodule

        2:解碼路由器核心代碼之一:解碼控制模塊:decode_control_sm. v

        ///////////////////////////////////////////////////////////////////////////////

        // vim:set shiftwidth=3 softtabstop=3 expandtab:

        // Copyright(c) 2009, All rights reserved.

        // Advanced Network technology Lab, Shenzhen graduated school of PKU

        // Module: decode_control_sm.v

        // Project: NF2.1

        // Time and Author: 2009-12-15 zhang ming long

        // Description: According to the pkts' source and generation sequence number,

        // this module goes round-robin strategy to control the module decoder

        // to decode the pkts stored in DRAMS.

        ///////////////////////////////////////////////////////////////////////////////

        `define DLY #1

        `timescale 1ns/1ps

        module decode_control_sm

        #(parameter SRC_WIDTH = 4,

        parameter GEN_WIDTH = 8,

        parameter REG_GRP_WIDTH = 12,

        parameter SRC_GEN_SEQ_WIDTH = 24,

        parameter DRAM_NUMS = 3,

        parameter CAM_NUMS = 3,

        parameter DRAM_NUMS_WIDTH = log2(DRAM_NUMS),

        parameter CAM_NUMS_WIDTH = log2(CAM_NUMS),

        parameter DRAM_BLOCK_WIDTH = 8,

        parameter CAM_ADDR_WIDTH = 8,

        parameter CMP_DATA_MASK = 12'hfff

        )

        (// --- cam interface

        output [SRC_GEN_SEQ_WIDTH-1:0] cmp_data_0,

        output reg [SRC_GEN_SEQ_WIDTH-1:0] cmp_data_mask_0,

        input [CAM_ADDR_WIDTH-1:0] match_addr_0,

        input match_0,

        output [SRC_GEN_SEQ_WIDTH-1:0]



        關鍵詞: 源代碼原理

        評論


        技術專區

        關閉
        主站蜘蛛池模板: 新平| 格尔木市| 偏关县| 吉木萨尔县| 周至县| 灌阳县| 敖汉旗| 繁昌县| 夏河县| 马公市| 双城市| 琼海市| 兰考县| 屯昌县| 南丹县| 梁山县| 恩施市| 延吉市| 大连市| 张家口市| 内丘县| 工布江达县| 洛隆县| 涡阳县| 连南| 金寨县| 航空| 当阳市| 皋兰县| 安阳市| 托克逊县| 宁乡县| 锦屏县| 桦甸市| 渑池县| 高要市| 洛浦县| 连南| 哈巴河县| 香河县| 澜沧|