When I try to test them, back to back, my speed drops significantly (bellow 150 MHz).
...
And just to be more precise, the limiting factor when they are both tested is, frame-to-output(Tx) to curr_state(Rx).
From this I imply that what you mean by "back-to-back" testing you mean you connect the Tx Output to the Rx Input. As Russell says, you need to review the CRC_APPENDED
and TX_FRAME
paths between Tx and Rx:
- TX_FRAME
(the Tx Output) is registered on output in the Tx Block. I will assume it goes straight to the CRC Decoder in the Rx. This path could not be re-pipelined any further.
- CRC_APPENDED
comes straight out of the OuStDecode_Tx Mux i.e. combinational logic. Try generating CRC_APPENDED
from a synchronous process:
p_crc_appended : process (CLK, RESETn)
begin
if(RESETn = 0) then
CRC_APPENDED <= '0';
elsif (rising_edge(CLK)) then
CRC_APPENDED <= appended_crc;
end if;
end process;
plus, CRC_APPENDED
and TX_FRAME
will change on the same clock edge. Currently CRC_APPENDED
changes one clock cycle before TX_FRAME
.
tl;dr try registering appended_crc
to generate CRC_APPENDED