NSE-8G™ Standard Product Data Sheet
Preliminary
--
--
Get the MSG_LVL
rd(RX_STTS);
WHILE rx_stts_valid = '0' LOOP
rd(RX_STTS);
END LOOP;
msg_lvl_loop := rx_msg_lvl;
--
--
--
--
Now Check the RX_SYNC_DONE status to be sure we're not going to skip
the 1st message...
IF rx_sync_done = '0' THEN
--
--
--
Do the RX_XFER_SYNC
wr(RX_STTS, "00000000000000000000000000000001");
Poll the RX_FI_BUSY bit
--
--
--
rd(RX_STTS);
WHILE rx_fi_busy = '1' LOOP
rd(RX_STTS);
END LOOP;
END IF;
--
--
--
--
Next RX MSG Buffer is now synched and we know how many messages we have.
Just read the messages out.
msgs_rd := 0;
tst_report("Processing " & to_str(msg_lvl_loop) & " messages.");
WHILE msgs_rd < msg_lvl_loop LOOP
-- Loop on read value of rx_msg_lvl
--
--
--
Check the CRC_ERR bit for this message
rd(RX_STTS);
rxmsg.crc_err := crc_err_reg;
--- Simulation Stuff
--
--
--
This code skips errored messages.
WHILE crc_err_reg = '1' AND rndm_skip_msg_mode LOOP
tst_report("Errored message received and being skipped...");
IF rx_sync_done = '1' THEN
wr(RX_STTS, "00000000000000000000000000000001");
ELSE
--
-- We're in this loop 2nd time without a good msg inbetween. Need 2
-- RX_XFER_SYNC writes to do a message skip
--
wr(RX_STTS, "00000000000000000000000000000001");
--
--
--
Poll the bit here before starting next message.
rd(RX_STTS);
WHILE rx_fi_busy = '1' LOOP
rd(RX_STTS);
END IF;
rx_msg_cnt_o <= rx_msg_cnt_o + 1;
msgs_rd := msgs_rd + 1;
--
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers’ Internal Use
Document ID: PMC-2010850, Issue 1
151