| Author |
Message |
jerina
Joined: 08 Nov 2005 Posts: 9
|
14 Nov 2005 13:05 Pointers in verilog??? |
|
|
|
|
Hi all,
could anyone help me out:
How pointers can be implemented in verilog?
Thanks
Jerina
|
|
| Back to top |
|
 |
Google AdSense

|
14 Nov 2005 13:05 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
echo47
Joined: 07 Apr 2002 Posts: 4206 Helped: 566
|
14 Nov 2005 14:34 Pointers in verilog??? |
|
|
|
|
Verilog doesn't have anything like pointers in C. Remember that Verilog is a hardware description language, not a programming language.
If you can explain what you would like to do, someone here can probably show you an appropriate technique.
|
|
| Back to top |
|
 |
jerina
Joined: 08 Nov 2005 Posts: 9
|
16 Nov 2005 6:57 Re: Pointers in verilog??? |
|
|
|
|
Hi
actually the job is to convert the coding in 'C' to Verilog coding.
Many pointers are used int he coding and i want how it can be done using verilog
|
|
| Back to top |
|
 |
echo47
Joined: 07 Apr 2002 Posts: 4206 Helped: 566
|
16 Nov 2005 7:32 Pointers in verilog??? |
|
|
|
|
The usual approach is to redesign the C program's functionality as digital logic - counters, accumulators, registers, multiplexers, memory, sequencers, etc., and then use Verilog to describe that hardware.
If this is an FPGA project, you could drop a microprocessor into it and run your C code directly.
|
|
| Back to top |
|
 |
avimit
Joined: 16 Nov 2005 Posts: 417 Helped: 69 Location: Fleet, UK
|
17 Nov 2005 9:46 Re: Pointers in verilog??? |
|
|
|
|
A pointer can be implemented in hardware(Verilog/VHDL) by a simple counter and a memory array. The counter will serve as an address to the memory so it will serve the same purpose as a C pointer. You can increment or decrement the counter as you would a pointer in C. You can modify the contentes of the memory(that is the data pointed to by the pointer), by reading the memory location currently pointed to by the address counter(that is your hardware pointer), modify it and write it back.
hope this helps.
Kind Regards,
Aviral Mittal
|
|
| Back to top |
|
 |