OpenCores
URL https://opencores.org/ocsvn/timestamp/timestamp/trunk

Subversion Repositories timestamp

[/] [timestamp/] [trunk/] [doc/] [README] - Rev 2

Compare with Previous | Blame | View Log

--
-- PowerPC 405 APU FCM "timestamp"
-- record a time (counter value) of User Defined Instruction execution
--
-- idea by Pavel Pisa <pisa@cmp.felk.cvut.cz>
-- written by Marek Peca <mp@duch.cz> 07/2008
-- KRT FEL CVUT http://dce.felk.cvut.cz/
--

The core is a fabric coprocessor module (FCM) for the PowerPC 405 CPU 
providing code execution timestamp. It allows to measure precisely CPU 
code execution times. A user-defined instruction (UDI) is provided by 
the timestamp FCM, which records current time (32bit free running 
counter) into the block RAM, which can be read later from the RAM, 
mapped into ordinary CPU address space.

User code may execute a new instruction introduced by the FCM, udi0fcm, 
with an optional argument (register), bearing so called tag. The current 
counter time (ie. in CPU clocks) is stored at that specific instant into 
the RAM, together with the tag. The tag can carry any value loadable to 
a CPU register, eg. instruction pointer or an arbitrary number. Stored 
values can be later dumped by a CPU from the RAM, and delays between 
particular time stamps may be thus computed. The instruction execution 
lasts 2 CPU cycles.

For more info and block diagram, see frescor_fpga.pdf, Sec. 3.1.

VHDL code of the timestamp FCM has been synthesized by Xilinx ISE 9.2i 
and glued by Xilinx EDK 9.2i into Virtex-4 FPGA hardware containing 
PowerPC 405 CPU. The FCM has been tested either running without an 
operating system (using gcc 4.3.2 and proprietary Xilinx headers), as 
well as under Linux 2.6.27-rc4, incorporating Xilinx PowerPC specific 
patches and the attached patch (linux-2.6-fcm_udi_enable.diff), enabling 
use of UDIs in user space.

File description:

system.mhs.example
        example glue between timestamp and PPC (for EDK)

pcores/timestamp/data/timestamp.mpd
        peripheral description for timestamp core (for EDK)

pcores/timestamp/hdl/vhdl/timestamp.vhdl
        the actual timestamp core (using proprietary Xilinx 16Kb BRAM)

tstamp_linux/linux-2.6-fcm_udi_enable.diff
        Linux kernel patch to enable udi0fcm instruction

tstamp_linux/tstamp_lnx.c
        Linux userspace example code (gcc & Linux glibc)

tstamp_sysless/testapp_tstamp.c
        operating system-less example code (gcc & Xilinx libs)


--
Greetings by Marek

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.