Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How pointers can be implemented in Verilog?

Status
Not open for further replies.

jerina

Newbie level 5
Newbie level 5
Joined
Nov 8, 2005
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,361
Pointers in verilog???

Hi all,

could anyone help me out:
How pointers can be implemented in verilog?

Thanks
Jerina
 

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.
 

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
 

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.
 

    jerina

    Points: 2
    Helpful Answer Positive Rating
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top