memory addressing

A

Ani

Guest
i would like to transfer the first 'n' bytes of one memory into another
memory, both of same width but different lengths. is there some way to
do this without using a loop?
 
Ani yazdi:
i would like to transfer the first 'n' bytes of one memory into another
memory, both of same width but different lengths. is there some way to
do this without using a loop?
I don't know whether a keyword or system task/function in SystemVerilog
predefined for that, maybe thru a struct manipulation with pointer
arithmetic a la C?

In Verilog there is no such keyword/system task. Since there no pointer
arithmetic in Verilog, there is no trick you can do without loop.

Utku.
 
yeah thats what i thought...was just wondering if somebody could throw
up some cool trick!
Utku Özcan wrote:
Ani yazdi:
i would like to transfer the first 'n' bytes of one memory into another
memory, both of same width but different lengths. is there some way to
do this without using a loop?

I don't know whether a keyword or system task/function in SystemVerilog
predefined for that, maybe thru a struct manipulation with pointer
arithmetic a la C?

In Verilog there is no such keyword/system task. Since there no pointer
arithmetic in Verilog, there is no trick you can do without loop.

Utku.
 
An applicable "trick" you like depends upon your application.

You just want to get rid of a loop implementation, but don't forget
that even a keyword/predefined SystemVerilog/Verilog task might also
include a loop implementation.

Your requirement is that you want to "transfer" "n" bytes from a memory
to another. But you don't give much more information. Does the content
of "source memory" get updated? Then you cannot use a pointer
arithmetic. You must "copy" it.

Give us more info about your application and about the language you
want to use. Otherwise, the only thing I can recommend is a loop,
nothing else.

Utku.

Ani yazdý:
yeah thats what i thought...was just wondering if somebody could throw
up some cool trick!
Utku Özcan wrote:
Ani yazdi:
i would like to transfer the first 'n' bytes of one memory into another
memory, both of same width but different lengths. is there some way to
do this without using a loop?

I don't know whether a keyword or system task/function in SystemVerilog
predefined for that, maybe thru a struct manipulation with pointer
arithmetic a la C?

In Verilog there is no such keyword/system task. Since there no pointer
arithmetic in Verilog, there is no trick you can do without loop.

Utku.
 

Welcome to EDABoard.com

Sponsor

Back
Top