I want to assign a memory 64x6 in a memory 64x6 by saying that all the 64 rows in memory_2 will be equal to all the 64 rows in memory_1, how to make that in verilog ?? knowing that it is very easy in MATLAB as it is matrix based
Build a state machine to do the copying by routing the data output of one memory to the data in of the other, counting up addresses and manipulating the strobes appropriately?
You are probably going to want a mux or two to switch the bus routing appropriately.
HDLs are hardware description not software, think in terms of what circuitry you would need, the answer generally drops out from that question.
You could output Verilog from Matlab... (and, cross your fingers and hope it works)
RTL: If concurrent, all you need is a common address, data and control to both memories. If writing 2nd memory after 1st, you need a memory controller to read 1st and write 2nd. You can't just "magically" move data in HW
Behavioral: You should be able to use
clone operation (i.e deep copy) You can do this in Systemverilog (IEEE-1800), not Verilog (IEEE-1364) (Usually a simulator license feature you would need). Although,
clone may only be available in a class (i.e. OOP-space of IEEE-1800 Standard). In Verilog, you could probably do a
for each loop.
You could also put a picoblaze on there and simply do it in software. They take up very little space in hardware, and they are free as in beer to use. Also quite well documented, you can get up and running with this soft processor in a few hours. This might be a good fit for your design, particularly if there are other functions that it could perform.