VHDL write to specific memory address

OP #5941216
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
Guest
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.

Reply

A question of your own? This thread is over 7 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.