EmbDev.net

Forum: FPGA, VHDL & Verilog VHDL write to specific memory address


von Robert R. (ipodfan)


Rate this post
useful
not useful
Hello,
currently I am trying to buffer a value from VHDL and read it out in 
C++. To give you a better understanding of my situation:
I want to use the internal clock of my FPGA, to be used by C++. I use a 
Xilinx FPGA with a linux os, so I can run my C++ software. The hardware 
was predesigned.
My idea was to read out the clock signal with VHDL and buffer it by 
writing into the memory (on a hardcoded address), so I can read it out 
with C++.
But I have issues writing to a very specific address.

Is this even possible with VHDL (or Verilog) or do I have to work 
completely in C++ for my issue?

PS: I know there are examples out there, talking about the issue of 
saving data in the memory, but they do not write into a specific memory 
address.

Best Whishes
Robert

von Vancouver (Guest)


Rate this post
useful
not useful
Robert R. wrote:
> Xilinx FPGA with a linux os

No. Linux is not running on an FPGA. I guess you have a Zynq device and 
Linux is running on the embedded CPU cores, right? Or you have a 
softcore CPU? Which one?

Robert R. wrote:
> My idea was to read out the clock signal with VHDL and buffer it by
> writing into the memory (on a hardcoded address), so I can read it out
> with C++.

A clock is typically a signal toggling each some nanoseconds. You want a 
memory location where a certain bit is changed some million times per 
second, and read this memory location with a software running on a 
non-realtime OS? Possibly you want something different, namely 
synchronize a software process to a clock signal generated inside the 
FPGA?

But to answer your question: No, you cannot use VHDL to write data into 
a memory location. But you can use VHDL to specify an architecture that 
does it. This is quite common. You can access the Zynq memory via the 
internal AXI bus from the programmable logic.

von Robert R. (ipodfan)


Rate this post
useful
not useful
Thank you very much for your response! That´s the first helpful answer 
in many forums from now on. Most people didnt I think, now I got 
something, I can do some more research on.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.