always @(posedge clk or negedge rstn) begin
if(!rstn) mac_ctrl[7:0] <= 8'h0;
else if(tg_enable) begin
if(local_flt) begin
mac_ctrl[7:0] <= 8'h11; // change to 8'hee in ECO
end else if(rmt_flt) begin
mac_ctrl <= 8'hff;
end else if(sop) begin
mac_ctrl[7:4] <= ictrl[3:0];
mac_ctrl[3:0] <= hold_ctrl[3:0];
end else begin
mac_ctrl[7:0] <= ictrl[7:0];
end
end
end