electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Pointers in verilog???


Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> Pointers in verilog???
Author Message
jerina



Joined: 08 Nov 2005
Posts: 9


Post14 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
Google Adsense




Post14 Nov 2005 13:05   

Ads




Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post14 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


Post16 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


Post16 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


Post17 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
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> Pointers in verilog???
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
creating pointers in verilog (3)
fifo pointers - Y only gray code pointers are used ??? (5)
Pointers (7)
Function Pointers in C (9)
pointers in MATLAB? (1)
Understanding pointers in C (3)
C language - pointers to functions (4)
Pointers to struct assignment (1)
[C] What's pointers like *** mean? (3)
Two pointers on the same adress. (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS