N
naran
Guest
I have a memory of 1024 location and data width is 16 bit.
i have modeled it using using with only the memory in the file.
Now i need to remove first 60 location and move the next 60 location
values to that position.
like this i have to move the subsequent values to the preceding 60
values untill i reach the last memory location.
Shall i have this part of memory module as external memory or i can
have it as an internal memory.
i am designing it for porting in FPGA.
Shall i use like the code below
module memory( );
---//input delcaration
-- //memory declaration
always @(posedge clk)
if(rst)
begin
end
else if(mem_rd==1)
begin end
else if(mem_wr==1)
begin end
else if ( swap_en==1)
begin
mem[off_wr]<=mem[off_rd];
mem[off_wr+1]<=mem[off_rd+1];
mem[off_wr+2]<=mem[off_rd+2];
----------------------
-----------------
mem[off_wr+59]<=mem[off_rd+59];
end
i have modeled it using using with only the memory in the file.
Now i need to remove first 60 location and move the next 60 location
values to that position.
like this i have to move the subsequent values to the preceding 60
values untill i reach the last memory location.
Shall i have this part of memory module as external memory or i can
have it as an internal memory.
i am designing it for porting in FPGA.
Shall i use like the code below
module memory( );
---//input delcaration
-- //memory declaration
always @(posedge clk)
if(rst)
begin
end
else if(mem_rd==1)
begin end
else if(mem_wr==1)
begin end
else if ( swap_en==1)
begin
mem[off_wr]<=mem[off_rd];
mem[off_wr+1]<=mem[off_rd+1];
mem[off_wr+2]<=mem[off_rd+2];
----------------------
-----------------
mem[off_wr+59]<=mem[off_rd+59];
end