Custom processor developement issues

Hi all,

I'm trying to find a simple way to check the functional correctness of a custom processor/coprocessor/thingy on an FPGA (I'm kindo new at this). The core itself is generated automatically (and as such should behave as planned), so I only need to check if the algorithm that the processor is supposed to run is working correctly. The processor operates on the data in it's data memory and I'm looking for a simple way to check that memory's contents, both during simulation and from the FPGA. Available tools include Xilinx ISE Webpack + ModelSim XE and Altium Designer + Nanoboard NB1 (Spartan2). During simulation I wasn't able to access the memory's internal content (the VHDL variable) from ModelSim so I tried to verify the design by observing processor/memory comunication which is tedious and error-prone process (so is using a soft logical analyzer after implementation). Btw. the implementation uses memories generated with CoreGenerator if it makes any difference. So, is there a simple way to run the program on the FPGA and (after the processor HALTs) read the results on my PC?

TIA

Regards, RG

Reply to
argee
Loading thread data ...

I usually add non-synthesizable code that monitors the memory controller and appends a line to a .CSV file every time a read or write is performed. Basic template for such logging is...

-- synthesis translate_off process if (Reset = '1') then -- Overwrite existing xxx.csv file with a header line showing -- what signals will be written else if (Memory_Write = '1') then -- Append to xxx.csv file with the address and data being written end if; if (Memory_Read = '1') then -- Append to xxx.csv file with the address and data being read from. end if; end process;

-- synthesis translate_on

You can use standard VHDL text file I/O procedures to do the file stuff. If you don't have one, you'll need something to convert std_logic_vectors into strings so that they can be output. I use Ben Cohen's image package to do that work Google link is

formatting link

Formatting the output as a simple comma separated variable file means you can easily import it into a spreadsheet and do additional work if necessary.

Reply to
KJ

Also add "wait on Reset, Memory_Write, Memory_Read;" to the start of the process in the previous post.

KJ

Reply to
KJ

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.