Hi all, I want to get current system time with a FPGA board using VHDL like YEAR/MONTH/DAY/HOUR/MINUTE/SECOND, but there is no primitive or function like datetime() that we can find in Python Java. Could you tell me how should I do?
Sorry, but your question suggests that you haven't understood at all what FPGAs are and what they actually do. Python and Java are Programming Languages intended to be run on some sort of computer with a dedicated computation unit and some software environment already existing. This is why there is a time available which can even be synchronized in some way (NTP, GPS, ...). A FPGA is very different from that. It is basically just a buch of logic components whose wiring can be described by a special hardware description language (HDL), like VHDL or Verilog. These logic components basically have no clue about time. If you really have to do something with time on an FPGA you gave to care for yourself to get it there.
LisaLLLL wrote: > I want to get current system time with a FPGA board using VHDL Thats a nice approach. Read a few lines about VHDL and (at least) try to understand that your question is like "I want to build a skyscraper by using concrete. Could you tell me how should I do?" The answer is: "Of course concrete is necessary for a skyscraper, but you need much more. And at first you need a plan!" meh wrote: > you haven't understood at all what FPGAs are and what they actually do. Thats absolutely obviously a fact. And after having read any book (at least the first 20 pages) and having figured out what a FPGA is, the same thing starts with VHDL. And finally the most important thing to figure out, is that FGPA is not VHDL. The part of VHDL that can be synthesized on a real target FPGA is at maximum 5% of VHDL. But at this moment there is to see not the faintest idea about both of them... LisaLLLL wrote: > I want to get current system time with a FPGA board What HARDWARE does give you the current time? Is there a /real time clock/ circuit on the FPGA board? What interface to the FPGA has it?
: Edited by Moderator
LisaLLLL wrote: > I want to get current system time with a FPGA board using VHDL like > YEAR/MONTH/DAY/HOUR/MINUTE/SECOND, but there is no primitive or function > like datetime() that we can find in Python Java. Could you tell me how > should I do? maybe you are looking for a Time stamp passed from the Revision control System into the VHDL-code. Maybe you shall consiter a Little script which generates a VHDL package consisting of a constant string. See https://stackoverflow.com/questions/18141851/compile-date-and-time-in-fpga
Well, AS FPGAs are basically a bunch of logic circuits waiting to be connected in any way you want it to, I'd suggest you get yourself a RTC (Real Time Clock) module, build an interface for it and connect them both. Then you could measure time, and after calibration also get your time by adding the passed seconds to the calibration constant