% subckt of dspoutfpga buffers DSP expansion bus data to the VME output port % FUNCTION lpm_fifo_dc (data[31..0],rdreq,wrreq,rdclock,wrclock,aclr) WITH (LPM_WIDTH=32,LPM_NUMWORDS=512,LPM_WIDTHU=9) RETURNS (q[31..0],rdempty,wrfull,rdusedw[8..0],wrusedw[8..0]) ; SUBDESIGN TDSPBUF %modified from DSPBUF 6/13/00% (CP, %40 MHZ LOCAL CLOCK, LPM_FIFO_DC'S READ CLOCK% /RSTBUF, % reset from the CNTLSTAT register % RDBUF, % the read enable from VMEOUT % SELBUF, % selected by VMEOUT % XFCLK, % the expansion bus write clock % /XCE1, % the expansion bus write enable % XD[31..0] % the expansion bus output data % :INPUT; BUFRDY, % buffer is ready with >0 words % EF, % the buffer empty status % HF, % the half full flag to the DSP % FULL, % the buffer full status % DO[31..0], % data to VMEOUT % BUFWDCNT[8..0] % the number of words in the buffer % :OUTPUT;) VARIABLE BUF :lpm_fifo_dc; BEGIN % the DSP writes to the fifo from its expansion port: % BUF.wrclock = XFCLK ; BUF.wrreq = !/XCE1 ; BUF.data[] = XD[] ; % VME reads the output port of the fifo: % BUF.aclr = !/RSTBUF ; BUF.rdclock = CP ; BUF.rdreq = RDBUF ; EF = BUF.rdempty ; HF = (BUF.rdusedw[]>=255) ; %new, 6/13/00% % because lpm_FIFO_dc can store only 511 words, HF has to be asserted when fifo has 255 words% FULL = BUF.wrfull ; BUFWDCNT[] = BUF.rdusedw[] ; DO[] = SELBUF & BUF.q[] ; BUFRDY = !BUF.rdempty ; END ;