ad_tdd_control: Fix the tdd_burst_counter implementation

main
Istvan Csomortani 2017-11-06 10:26:53 +00:00 committed by István Csomortáni
parent 53fa482837
commit a7b98c397a
1 changed files with 7 additions and 3 deletions

View File

@ -230,10 +230,14 @@ module ad_tdd_control#(
// tdd burst counter
always @(posedge clk) begin
if (tdd_cstate == ON) begin
tdd_burst_counter <= ((tdd_burst_counter > 0) && (tdd_endof_frame == 1'b1)) ? tdd_burst_counter - 1 : tdd_burst_counter;
if (rst == 1'b1) begin
tdd_burst_counter <= 6'b0;
end else begin
tdd_burst_counter <= tdd_burst_count;
if (tdd_cstate == OFF) begin
tdd_burst_counter <= tdd_burst_count;
end else if ((tdd_burst_counter > 0) && (tdd_endof_frame == 1'b1)) begin
tdd_burst_counter <= tdd_burst_counter - 1'b1;
end
end
end