1.在TOP中实例化译码器
SCList_Decoder #(.LLR_WIDTH(INNER_LLR_WIDTH), .n(n), .l(3), .K(K), .FROZEN_BITS(32'b00000000000000110000011101111111), .CRC_poly(4'b0011), .N_CRC(K_CRC))
scl_decoder(.clk(FCLK_CLK0), .reset(manual_reset), .input_ready(input_ready), .output_ready(output_ready), .decoded_bits(o_inform), .LLR(i_signal));
重要信号:
时钟:FCLK_CLK0
译码器Reset:manual_reset
译码器使能:input_ready
译码完成:output_ready
译码结果:o_inform
输入LLR信号:i_signal
2.与i_signal相关,bram_ctrl
输入信号为8位,23 or 24???
//Add signals of user test project
8'h20 : cpu_rdata <= {23'b0, i_signal }; //output reg [8-1:0]
8'h21 : cpu_rdata <= {31'b0, i_en };
8'h22 : cpu_rdata <= {31'b0, i_wr };
8'h23 : cpu_rdata <= {31'b0, i_device_ok };
8'h24 : cpu_rdata <= {23'b0, o_inform }; //input [8-1:0]
always @(posedge clk or posedge rst)begin
if(rst)
i_signal <= 8'b0;
else if(cpu_we &&cpu_addr[7:0]==8'h20)begin
i_signal <= cpu_wdata[7:0];
end
else if(cpu_we && cpu_addr[7:0]==8'h21)begin
i_signal <= 8'd0;
end
end
3.SDK Hello word
更改Input_data中的内容为你希望的输入
for(int i=0;i<=8;i++)
{
//input data function
Xil_Out32(i_signal, input_data[j][i]+device_state[k][i]*256);
}