Altera_Forum
Honored Contributor
12 years agoReed Solomon IPcore 13.0 problem
Hello,
I'm trying to use the evaluation version of the RS encoder and decoder. I configured it as (223,255) with 8bit symbols and cascaded them, generating the control signals with the following module:
module avalon_st_interface(
input clk,res,
input valid,
input data_in,
input source_en,
output reg sop,eop,source_val,
output reg sink_en,
output reg data_out,
output reg count
);
reg valid_mem;
always@(posedge clk)begin sink_en<=source_en;end
always@(posedge clk)begin data_out<=data_in;end
always@(posedge clk)begin valid_mem<=valid;end
always@(posedge clk or posedge res)
begin
if(res)
begin
count<=9'd0;
sop<=1'd0;
eop<=1'd0;
source_val<=1'd0;
end
else
begin
if(!valid_mem & valid & count==9'd0) //first symbol if idle
begin
count<=9'd1;
sop<=1'd1;
eop<=1'd0;
source_val<=1'd1;
end
else if(valid & count==9'd222) //next one is the last
begin
count<=count + 9'd1;
sop<=1'd0;
eop<=1'd1;
source_val<=1'd1;
end
else if(valid & count==9'd223) //first symbol if keep on transmitting
begin
count<=9'd1;
sop<=1'd1;
eop<=1'd0;
source_val<=1'd1;
end
else if(valid & count>=9'd0 & count<=9'd222) //symbols are passing through
begin
count<=count + 9'd1;
sop<=1'd0;
eop<=1'd0;
source_val<=1'd1;
end
else if(!valid & count>=9'd0 & count<=9'd222) //interrupted
begin
count<=count;
sop<=1'd0;
eop<=1'd0;
source_val<=1'd0;
end
else if(!valid & (count==9'd0 | count==9'd223)) //idle
begin
count<=9'd0;
sop<=1'd0;
eop<=1'd0;
source_val<=1'd0;
end
else
begin
count<=9'd0;
sop<=1'd0;
eop<=1'd0;
source_val<=1'd0;
end
end
end
endmodule Simulations and SignalTap show that sop and eop are generated but I get nothing out of the decoder. I use it with audio data and the output is null, except the source valid signal that is high. Any advice? Thank you